N
Nuxt2mo ago
PetyXbron

Nuxt UI selectMenu unselect

Is it possible to unselect current selected option in selectMenu component from Nuxt UI? It is possible whenever prop multiple is true, but I am not sure whenever is multiple false...
2 Replies
kapa.ai
kapa.ai2mo ago
Hi @PetyXbron. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the provided knowledge sources, the Nuxt UI SelectMenu component allows unselecting options when the multiple prop is true, as you mentioned. In this mode, users can select and deselect multiple items, and the value is managed as an array. However, for the single selection mode (when multiple is false or not set), the documentation does not explicitly mention a built-in way to "unselect" or clear the current selection—there is no mention of a clearable prop or a default UI affordance for removing the selection so that no item is selected. The examples always show a value being selected, and the v-model is bound to a single value or object, not null or undefined. There is also no mention of a "clear" button or similar feature in the SelectMenu API or examples provided in the sources. Therefore, based on the available documentation, it appears that unselecting (clearing) the current selection in single-select mode is not natively supported or documented for the SelectMenu component in Nuxt UI. If you require this functionality, you may need to implement a custom solution, such as adding a "None" option to your items list and handling it accordingly in your logic. If you need more advanced clearing behavior, you may want to monitor future updates to the component or check the official documentation for any new features related to this use case. SelectMenu documentation ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai2mo ago
<@411436203330502658> Kapa.ai is still learning and improving, please let me know how I did by reacting below.

Did you find this page helpful?