Skip to content

Commit 5806f25

Browse files
committed
emit onchange() event when the value is changed
1 parent 6320cf4 commit 5806f25

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/MultipleSelect.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ class MultipleSelect {
3535
option.removeAttribute('selected')
3636
}
3737
})
38+
39+
if (selectedItems.length < 1) {
40+
this.$select.value = ''
41+
}
42+
43+
this.$select.onchange()
3844
})
3945

4046
// when the container is done rendered, the dropdown

0 commit comments

Comments
 (0)