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

InputMenu Clear Search Term on Select #3782

Open
Lateralus58 opened this issue Apr 3, 2025 · 1 comment
Open

InputMenu Clear Search Term on Select #3782

Lateralus58 opened this issue Apr 3, 2025 · 1 comment
Labels
question Further information is requested v3 #1289

Comments

@Lateralus58
Copy link

Description

I've recently upgraded to NuxtUi v3.0.2 from v3.0.0-beta.2 and I'm having an issue with the search term prop on the component.

When using the input with search and multiselect, I'd like the search term to clear as the user selects menu items. I was able to achieve this, in previous versions, by using a v-model on the search term and calling a function to clear the search term on the update:ModelValue event. Unfortunately, this isn't working on the most recent version.

It appears that update:ModelValue is being emitted and I am able to clear the searchTerm ref value. However, the change doesn't propagate to the component unless I hit the tab key or click out and click back into the component.

Is there a potential workaround or could this become a feature request to include a prop which clears the search term on item select?

@Lateralus58 Lateralus58 added question Further information is requested v3 #1289 labels Apr 3, 2025
@Lateralus58
Copy link
Author

Lateralus58 commented Apr 4, 2025

@benjamincanac

I've created an example on code sandbox and added you to the workspace (feel free to invite users as needed): https://codesandbox.io/p/devbox/s6376y

In the example I have two input menu components. The first is a standard inputMenu and the second uses the update model value event in attempt to clear the search term. Both appear to act exactly the same. When you type in a search term and press enter, the search term remains visible unless you click out of the input Menu and then click back in. This is difficult in instances where users need to add many items at a time. The function I used to clear the search did work on previous releases

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested v3 #1289
Projects
None yet
Development

No branches or pull requests

2 participants