Vue-multiselect: Not showing placeholder label for single select

Created on 29 Mar 2018  路  8Comments  路  Source: shentao/vue-multiselect

Hi,
In my current project, I am using vue-multiselect and facing problem while using single select .

no :multiple attribute

Example :

html_code

Problem is it is not showing the placeholder.
Here is screenshot:

searchform

And for more debugging here is screenshot of console:

console

Please help me with this..ASAP

After updating to version 2.1.0, placeholder is displayed but now it not showing selected value as you can see here :

image

And i have selected the value as you can in <span> here :

image

Most helpful comment

Empty :value should be [].
Check what is in v-model.

All 8 comments

Empty :value should be [].
Check what is in v-model.

@sourenaraya thanks for reply.
In my case :value is {} because it is it is single select

yes, i think its better to have {} as empty value in case of single select, but this component only support [] as empty value.

@sourenaraya thanks for your concern but dropdown values are showing just fine but problem is that placeholder is not displayed.

just set value in data to empty array. DO IT!

@sourenaraya I tried that no luck. And I have one more concern, as you can see in screenshot of console there is <span> tag appearing which is not appearing for other all multi selects.

I was also having this issue, but setting the empty value to an empty array fixed it. Thank you @sourenaraya

@sourenaraya you were right setting it as empty array worked.
As before I tested it, it was in influence of another custom class.
Thanks @sourenaraya

Was this page helpful?
0 / 5 - 0 ratings