Skip to content

Custom search function for the slash menu #488

@sahilpohare

Description

@sahilpohare

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions