By default, when we use vue-multiselect, the provided options only appear as it is in the selected labels. I want to customize this.
Support, I have this as the data,
options: [
{ code: 1002, text: 'A' },
{ code: 2001, text: 'B' },
{ code: 1, text: 'C' }
]
I want to display both the code and the text while showing the options in the dropdown menu, but once selected, I want to only show the code in the selected options. How can I achieve this?
There are slots for this kind of customization. You can use the
singleLabelslot to customize the selected option, and theoptionslot to customize each dropdown option