Closed hejianxian closed 8 years ago
hi!
I found something wrong in multiple select component, about set the selected status.
if 'value' = 0 or = false, etc. It can't be selected. 👀 ⬇️
In 'Select.vue' file,
<span class="glyphicon glyphicon-ok check-mark" v-show="isSelected(option[optionsValue] || option)"></span>
this option[optionsValue] || option will return 'option', and then.
option[optionsValue] || option
In this method, will return false.
isSelected (v) { return this.values.indexOf(v) > -1 }
so! I remove the '|| option'. Because we would not care the argument of 'indexOf()', it will automatically be 'string'.
hi!
I found something wrong in multiple select component, about set the selected status.
if 'value' = 0 or = false, etc. It can't be selected. 👀 ⬇️
In 'Select.vue' file,
this
option[optionsValue] || option
will return 'option', and then.In this method, will return false.
so! I remove the '|| option'. Because we would not care the argument of 'indexOf()', it will automatically be 'string'.