API response returns an object with nested attributes for each option. How can I tell track-by to use an object property? i.e. track-by="attributes.language"
Example here:
https://jsfiddle.net/fy18zy9b/3/
<multiselect
v-model="value"
:options="options"
:multiple="true"
track-by="attributes.language"
:custom-label="customLabel"
>
</multiselect>
Sample options:
[
{
attributes:
{
language : 'JavaScript',
library: 'Vue.js'
}
},
{
attributes:
{
language : 'JavaScript',
library: 'Vue-Multiselect'
}
},
{
attributes:
{
language : 'JavaScript',
library: 'Vuelidate'
}
},
]
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This is still relevant
+1
Would be great to have any prop 'customTrackBy' (Function => String) like 'customLabel' so as to work with any nested object
+1
Any updates on this?
Most helpful comment
+1
Would be great to have any prop 'customTrackBy' (Function => String) like 'customLabel' so as to work with any nested object