Skip to content

SelectMenu with fetched items (ignore-filter) doesnt remember current selection #4582

@MickL

Description

@MickL

Version

Latest commit https://pkg.pr.new/@nuxt/ui@62ab016

Description

When fetching items using ignore-filter prop <USelectMenu> does not remember the current selection.

Currently it works only if the selected item stays in the items array which is barely the case if dealing with more than 10 items:

Bildschirmaufnahme.2025-07-23.um.19.18.47.mov

This happens in two cases:

  1. When selecting an item the searchTerm gets resetted, the items-array changes and the selected item is no more in it -> Select menu label becomes empty
  2. When an item is selected, but searching for other items that dont include seleced item -> Select menu label becomes empty

Reproduction

Also reproducable in the docs:
https://ui.nuxt.com/components/select-menu#with-ignore-filter

Bildschirmaufnahme.2025-07-23.um.19.27.00.mov

Here case 1 never happens because the jsonplaceholder-api only has just 5 user-items so the selected user is always in the default empty search result. BUT case 2 happens: Select a user, open select again, type in any other name that doesnt include first user -> Select menu label becomes empty (weirdly tho, the avatar stays)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriagev3#1289

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions