wenzhixin / multiple-select

A jQuery plugin to select multiple elements with checkboxes :)
http://multiple-select.wenzhixin.net.cn
MIT License
1.91k stars 651 forks source link

Single select overriding the Multiple select #505

Closed ramya-sc closed 4 years ago

ramya-sc commented 4 years ago

Hi , I would like to mention that I am using Vue Component multiple select ( "multiple-select": "^1.4.1",) example as below <MultipleSelect ref="select" v-model="select" width="200" :data="data :options="options" @change="onChange" />

Problem: When I run my application multiple-select is working fine for locally as I am attaching the screenshot image When I try to deploy the same code (multiple-select library) to the server ,single select is overriding the multiple select as I am attaching the screenshot below image

Can you please help me on this?

wenzhixin commented 4 years ago

Sorry for this, in our latest version(1.5.0), we updated to use the default behavior of select element. http://multiple-select.wenzhixin.net.cn/docs/en/usage#via-javascript http://multiple-select.wenzhixin.net.cn/docs/en/options#single

if the select has not multiple attribute, this option will auto set to true.

<!-- Single Select -->
<select>
    <option value="1">January</option>
    ...
    <option value="12">December</option>
</select>

<!-- Multiple Select -->
<select multiple="multiple">
    <option value="1">January</option>
    ...
    <option value="12">December</option>
</select>

http://multiple-select.wenzhixin.net.cn/vue-examples#/single-row http://multiple-select.wenzhixin.net.cn/vue-examples#/basic

In your case, you need to add multiple attribute to your multiple select.