Open TimaBuldzer opened 4 years ago
and how to write it? i want 'name' instead of 'label'
and how to write it? i want 'name' instead of 'label'
use :normalizer="normalizer"
export default {
...
data() {
return {
normalizer(node) {
return {
id: node.id,
label: node.name,
children: node.children,
}
},
}
}
...
}
for more details look here https://vue-treeselect.js.org/#customize-key-names
Just ran into this issue. I used normalizer but it didn't fix issue as matchKeys value was still 'label', the default value. In order to change the matchValue prop, it's a matter of using the write syntax. This worked for me:
<treeselect
placeholder="Search and select"
:multiple="true"
:normalizer="normalizer"
:options="portfolioPrograms"
valueFormat="object"
:match-keys="['example_id']"
v-model="C_portfolioNamesFilter"
/>
Hello! where to write this matchKeys prop? Please help