Skip to content

Commit 87ab841

Browse files
author
Damian Dulisz
committed
1 parent 648f7d3 commit 87ab841

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Multiselect.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
@mousedown.stop.prevent=""
6464
class="multiselect__content">
6565
<slot name="beforeList"></slot>
66-
<li v-if="multiple && max === value.length">
66+
<li v-if="multiple && max !== 0 && max === value.length">
6767
<span class="multiselect__option">
6868
<slot name="maxElements">Maximum of {{ max }} options selected. First remove a selected option to select another.</slot>
6969
</span>

src/multiselectMixin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ module.exports = {
168168
*/
169169
max: {
170170
type: Number,
171-
default: false
171+
default: 0
172172
},
173173
/**
174174
* Will be passed with all events as second param.
@@ -303,7 +303,7 @@ module.exports = {
303303
* @param {Object||String||Integer} option to select/deselect
304304
*/
305305
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
307307
if (option.isTag) {
308308
this.$emit('tag', option.label, this.id)
309309
this.search = ''

0 commit comments

Comments
 (0)