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

Custom search function for the slash menu #488

Closed
sahilpohare opened this issue Dec 23, 2023 · 4 comments · Fixed by #609
Closed

Custom search function for the slash menu #488

sahilpohare opened this issue Dec 23, 2023 · 4 comments · Fixed by #609
Labels
enhancement New feature or request prio:high High priority

Comments

@sahilpohare
Copy link

Is your feature request related to a problem? Please describe.
I am using the editor for creating an editor for a niche. Where I need to be able to add tags, custom blocks etc. I want to use slash menu to execute commands for this. like /addgears or /xyz. Now there are about 200k items and I need a SlashMenu item in the list for each of them, to search and execute essentially the same function with a bit different arguments. I cannot store the data on the frontend. I have an api for searching.

I looked up features where I can modify the search function (give results based on api + default blocks)

Describe the solution you'd like
I would like a way to override the search blocks feature. Where I can take the query and return my own Slash menu item and execute it.

Describe alternatives you've considered
I tried mapping through the list in a json (dumb decision) and the app became a memory hog as it was 200k instances of the slash menu item + the execute function and no way to limit the number of results, rendereing everything at once.

@sahilpohare sahilpohare added the enhancement New feature or request label Dec 23, 2023
@YousefED
Copy link
Collaborator

I think this makes sense, and we need this for Mentions as well.

@YousefED YousefED added the prio:high High priority label Dec 29, 2023
@sahilpohare
Copy link
Author

sahilpohare commented Dec 29, 2023

@YousefED I am working on this
in #495

@sahilpohare
Copy link
Author

@YousefED Need a bit of help and review on the PR.

@YousefED
Copy link
Collaborator

YousefED commented Mar 5, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request prio:high High priority
Projects
None yet
2 participants