Skip to content

feat(SelectMenu): add clearable icon to reset modelValue#3244

Closed
emilsgulbis wants to merge 13 commits intonuxt:v3from
emilsgulbis:feat/select-menu-clearable
Closed

feat(SelectMenu): add clearable icon to reset modelValue#3244
emilsgulbis wants to merge 13 commits intonuxt:v3from
emilsgulbis:feat/select-menu-clearable

Conversation

@emilsgulbis
Copy link
Copy Markdown

@emilsgulbis emilsgulbis commented Feb 5, 2025

🔗 Linked issue

Resolves #1057

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Added clear button to the SelectMenu

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@benjamincanac benjamincanac added the v3 #1289 label Feb 5, 2025
@emilsgulbis
Copy link
Copy Markdown
Author

hey @benjamincanac
tried my best for first time OS PR. If i need to make any adjustments - please let me know

@emilsgulbis
Copy link
Copy Markdown
Author

@benjamincanac Could you please give me some instructions to make this good to merge?

@rasyidly
Copy link
Copy Markdown

up, i really need this feature 🚀

@hasan-ozbey
Copy link
Copy Markdown

what are we waiting for

@benjamincanac
Copy link
Copy Markdown
Member

Sorry for the delay on this, I've updated the PR and merged v3 but do note that this only works when the user actually provide a v-model, this is why I'd rather wait for Reka UI to implement this (unovue/reka-ui#1654).

@lacorde
Copy link
Copy Markdown

lacorde commented Oct 1, 2025

Quick workaround for those who need this sooner rather than later :

<USelectMenu
  v-model="selected"
  :items
>
  <template #trailing>
      <UIcon
        v-if="selected"
        name="i-lucide-x"
        class="size-4 cursor-pointer text-dimmed"
        @click="selected = undefined"
      />
  </template>
</USelectMenu>

@maximepvrt
Copy link
Copy Markdown
Contributor

maximepvrt commented Oct 13, 2025

@emilsgulbis @benjamincanac unovue/reka-ui#2213 has been merged and will be available in the next release 🎉
It adds the new resetModelValueOnClear option along with the <ComboboxCancel /> component.

It would be great to also add same option for InputMenu (#4239)

Linked to #5088

@benjamincanac benjamincanac marked this pull request as draft October 21, 2025 12:25
@benjamincanac
Copy link
Copy Markdown
Member

Closing in favor of #5643.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v3 #1289

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Clear Button to USelectMenu

6 participants