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

[v3][SelectMenu] with filter=false and value-key props #2807

Open
outluch opened this issue Nov 29, 2024 · 0 comments
Open

[v3][SelectMenu] with filter=false and value-key props #2807

outluch opened this issue Nov 29, 2024 · 0 comments
Labels
bug Something isn't working triage v3 #1289

Comments

@outluch
Copy link

outluch commented Nov 29, 2024

Environment

  • Operating System: Darwin
  • Node Version: v18.20.3
  • Nuxt Version: 3.14.1592
  • CLI Version: 3.15.0
  • Nitro Version: 2.10.4
  • Package Manager: [email protected]
  • Builder: -
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Is this bug related to Nuxt or Vue?

Nuxt

Version

v3.0.0-alpha.9

Reproduction

v3...outluch:ui:bugfix-valuekey-customsearch

Try to remove my patch (filter ? () => rootItems : undefined) in SelectMenu.vue and check how list of found items doesn't render in page select-menu.vue of playground

Description

I have found weird behavior with custom server-side search, while using custom value-label fields from my db results.
If you fetch items from server and they contain for example id and name instead of value and label, I pass props to SelectMenu: :value-key: "id", :label-key="name" and then when I try to search with input, it doesnot render results. I have found that it is because of Radix Vue: when we make own search we should not pass filter function to it, as I got it from sources of Radix. So my patch is in this one commit in my fork.

Btw I have noticed, that migration to Reka UI is on the way and in Reka there are ignoreFilter prop now. I guess, we will need to pass it false also.. Maybe not. I did not dig this 100% for now.

Hope, this will help.

v3...outluch:ui:bugfix-valuekey-customsearch

Additional context

No response

Logs

@outluch outluch added bug Something isn't working triage v3 #1289 labels Nov 29, 2024
@outluch outluch changed the title SelectMenu with filter=false and value-key props [v3][SelectMenu] with filter=false and value-key props Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage v3 #1289
Projects
None yet
Development

No branches or pull requests

1 participant