Skip to content

Conversation

YousefED
Copy link
Collaborator

@YousefED YousefED commented Feb 14, 2024

With this PR, any type T can be returned from getItems, as long as it's also expected by the element passed as suggestionMenuComponent. When using the default component MantineSuggestionMenu, we expect DefaultSuggestionItem as items.

Also:

  • the click handling is now separated from the items
  • separated / cleaned the default items a bit

TODO:

  • testing
  • determine highest level API. e.g.: do we want to keep the current slashMenuItems API working? (not too much effort I think)
  • discuss overall API / mentions API

Copy link

vercel bot commented Feb 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
blocknote ✅ Ready (Inspect) Visit Preview Feb 15, 2024 2:31pm
blocknote-website ✅ Ready (Inspect) Visit Preview Feb 15, 2024 2:31pm

Copy link
Collaborator

@matthewlipski matthewlipski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Minor comments

…ns-getitems

# Conflicts:
#	packages/react/src/components/SuggestionMenu/DefaultPositionedSuggestionMenu.tsx
#	packages/react/src/index.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants