Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vue js multiselect - having custom suggestion text

I am using vue multiselect plugin in my Vue v.1x project. I am wondering how can I customise suggestion text like Press enter to select or Press enter to remove, when hovering over options? You can see the example in the fiddle. I have tried with setting the :selectLabel="Select" but that didn't work.

like image 777
Leff Avatar asked Oct 03 '17 09:10

Leff


1 Answers

When sending props you need to use 'kebab-case'. So if the prop looks like selectLabel in the child, it should be pass like

:select-label="value"

Also, when sending the variable make sure to either to double quotes to send as a string, since the ':' before the prop tries to evaluate a variable.

Ex. The label should be 'Select'

:select-label="'Select'"

Ex. 2. The label should use a variable 'xyz' defined in the component

:select-label="xyz"
like image 155
Indyz Avatar answered Nov 12 '22 23:11

Indyz