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

feature suggestion: set trackBy default from label props #175

Closed
castrix opened this issue Dec 8, 2021 · 1 comment
Closed

feature suggestion: set trackBy default from label props #175

castrix opened this issue Dec 8, 2021 · 1 comment

Comments

@castrix
Copy link

castrix commented Dec 8, 2021

first of all, thank you for the component library, I just use the library today and I was confused when I tried to add searchable="true" props. Then I trace the problem with reading the source code, turns out that I didn't set the trackBy props because I use custom key object. I managed to resolve the problem, my suggestion is to force search by label prop if it's not empty

// useOptions.js
// line 419
return normalize(option[label.vaue || trackBy.value], strict.value).indexOf(normalize(search.value, strict.value)) !== -1
adamberecz added a commit that referenced this issue Dec 16, 2021
@adamberecz
Copy link
Collaborator

Thanks for the idea @castrix - added this in 2.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants