[Feature Request] VSelect list item custom key
See original GitHub issueProblem to solve
In VSelect
and derived components using VSelectList
, menu items are generated with an id depending on the current _uid
and the index of the item.
However, with VAutocomplete
, item array can dynamically change, and components will be recreated every time.
I currently have an item that can load external resource depending on the input, so recreating components is costly.
I’d like to evaluate the solution of providing a key for the item, so that Vue internals reuse components in a smarter way.
Proposed solution
If I understand correctly, VSelectList
must be updated to use a user defined key.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Select All Feature in v-select not save all the items
I am trying to add a select all button to the v-select component of vuetify. I am able to select all the options...
Read more >v-autocomplete API - Vuetify
name type default
#append‑icon string '$dropdown'
#append‑outer‑icon string undefined
#attach any false
Read more >Build A Custom Vue Select Component - YouTube
Lets build a pretty looking custom vue select component that replaces the traditional default element element. Lets build it with Vue 3, ...
Read more >Make Dropdown with Search box with vue-select - Vue.js
HTML <select > element doesn't provide search feature. In VueJS you can use vue-select component to add a customizable and responsive select ...
Read more >Vue-Multiselect | Vue Select Library
The basic single select / dropdown doesn't require much configuration. ... custom-label accepts a function with the option object as the first param....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It makes sense to me to just use
item-value
as the key if it isn’t an object.OK, now I know why Vuetify is popular. When developers take the time to understand and answer precisely with good solution, it’s worthy.
So the workaround is indeed (for external readers) to use a
v-list-item
otherwiseVSelectList
will create one withoutkey
.@KaelWD I let this opened if you plan to implement a new prop in the future, but for me, it can be closed.