-
Notifications
You must be signed in to change notification settings - Fork 528
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
[Feature Request] CommandPalette supports a loading state. #179
Comments
Hello @emojiiii, I know this doesn't solve your issue but I just added an example in the documentation on how to perform async search within the CommandPalette component with the What about displaying a loading icon when one of the CommandPalette group |
Thank you very much. I think this can serve as a temporary solution. |
@emojiiii Just made a PR to support a |
Thank you very much for your PR. However, I believe that compared to searches like button and input, the command palette has a larger visible area, and the loading status is more prominent when placed in the center of the pane panel. |
This would imply hiding all the existing results each time you type something. |
I think you are right, this could indeed lead to that issue. Maybe we can add an additional layer of mask + loading status on top of it. By the way, could you please tell me how to set the debounce time? And how can I cancel the previous API request when making a new one? |
You can use the |
Is your feature request related to a problem? Please describe.
Yes, the feature request is related to the problem of querying API results and needing to display a loading state while the results are being fetched.
Describe the solution you'd like
The solution I would like is for the CommandPalette component to have a loading state that can be displayed while the API results are being fetched. This would help improve the user experience by letting them know that the query is being processed and that they should wait for the results.
Describe alternatives you've considered
One alternative that could be considered is to not have a loading state and just let the user wait for the results without any indication of progress. However, this could lead to confusion and frustration for the user, especially if the query takes a long time.
Additional context
The text was updated successfully, but these errors were encountered: