Skip to content

Commit 2ec33a7

Browse files
authored
fix: select option should compare full value not substring, fix #115 (#118)
1 parent 7bfed47 commit 2ec33a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/src/MultipleSelectInstance.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@ export class MultipleSelectInstance {
971971
// when multiple values could be set, so we need to loop through each
972972
const selectOptions = this.elm.options;
973973
for (let i = 0, ln = selectOptions.length; i < ln; i++) {
974-
const isSelected = selectedValues.indexOf(selectOptions[i].value) >= 0;
974+
const isSelected = selectedValues === selectOptions[i].value;
975975
selectOptions[i].selected = isSelected;
976976
}
977977
}

0 commit comments

Comments
 (0)