File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 63
63
@mousedown.stop.prevent =" "
64
64
class =" multiselect__content" >
65
65
<slot name =" beforeList" ></slot >
66
- <li v-if =" multiple && max === value.length" >
66
+ <li v-if =" multiple && max !== 0 && max === value.length" >
67
67
<span class =" multiselect__option" >
68
68
<slot name =" maxElements" >Maximum of {{ max }} options selected. First remove a selected option to select another.</slot >
69
69
</span >
Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ module.exports = {
168
168
*/
169
169
max : {
170
170
type : Number ,
171
- default : false
171
+ default : 0
172
172
} ,
173
173
/**
174
174
* Will be passed with all events as second param.
@@ -303,7 +303,7 @@ module.exports = {
303
303
* @param {Object||String||Integer } option to select/deselect
304
304
*/
305
305
select ( option ) {
306
- if ( this . max && this . multiple && this . value . length === this . max ) return
306
+ if ( this . max !== 0 && this . multiple && this . value . length === this . max ) return
307
307
if ( option . isTag ) {
308
308
this . $emit ( 'tag' , option . label , this . id )
309
309
this . search = ''
You can’t perform that action at this time.
0 commit comments