Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clean getitems #579

Merged
merged 10 commits into from Feb 15, 2024
Merged

clean getitems #579

merged 10 commits into from Feb 15, 2024

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.

None yet

2 participants