-
Notifications
You must be signed in to change notification settings - Fork 12
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
Possible to Dynamically Load Command Palette Content? #20
Comments
The way it's designed you need to register all the actions upfront but you can choose to enable actions conditionally so they don't show up at the start. Also an action can receive dynamic data from the active component tree. Example- https://github.com/itaditya/solid-command-palette/blob/main/src/app/views/demo/DynamicActionContextDemo/DynamicActionContextDemo.tsx#L39 |
Thank you for the example. I will check it out. Basically I am looking to offer some routing capability to quickly jump to portions of the application based on a GUID - but the set of possible routes is dynamic through the life-cycle of the application requiring at minimum for the command palette to know the GUID and title. Do you think this would be possible? ( I will take a look at the code in the meantime ) My current implementation: (Edit: Added example) |
Got it, currently it's only possible if at the start of app you can create a list of routes but then disable the disallowed ones conditionally |
Just curious if there is an option to dynamically add actions to the command palette. I was able to modify the
<Root>
actions parameter to accept a Solid signal and then dynamically add actions using a generic timeout. But I couldn't seem add actions more than once.I am very new to SolidJS - and never learned much of React. I would be interested in some kind of collaboration on this front as this will end up in a production environment.
(Edited for clarity)
The text was updated successfully, but these errors were encountered: