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

feat(SelectMenu): add loading state on async search #520

Closed
wants to merge 2 commits into from

Conversation

mcastagnetti
Copy link
Contributor

The SelectMenu component is missing a loading state that informs the user when a process is ongoing. I have added a simple implementation to exhibit this behaviour.

It doesn't use the loading prop since it disables the component and does not truly represent the anticipated state.

I chose to keep this functionality internal to the component and not expose it as a prop, as it seems more natural for the
isSearching state to activate as soon as the user begins typing, rather than at the expiration of the debounce delay.

Let me know what you think!

Before After
Screen.Recording.2023-08-10.at.10.01.53.mov
Screen.Recording.2023-08-10.at.10.02.11.mov

@stackblitz
Copy link

stackblitz bot commented Aug 10, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@vercel
Copy link

vercel bot commented Aug 10, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
ui ✅ Ready (Inspect) Visit Preview Sep 12, 2023 0:53am

@mcastagnetti
Copy link
Contributor Author

mcastagnetti commented Sep 12, 2023

@benjamincanac, I successfully rebased the branch on the nuxt:dev branch, as the previous attempts failed

@benjamincanac
Copy link
Member

Closing this in favor of 3258167. You can now use the loading prop without disabling the SelectMenu: https://ui.nuxt.com/dev/forms/select-menu#async-search

@mcastagnetti mcastagnetti deleted the feat/add-loading-state branch January 8, 2024 08:27
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.

2 participants