Skip to content

Commit

Permalink
fix: select option should compare full value not substring, fix #115 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding authored Aug 22, 2023
1 parent 7bfed47 commit 2ec33a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/MultipleSelectInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,7 @@ export class MultipleSelectInstance {
// when multiple values could be set, so we need to loop through each
const selectOptions = this.elm.options;
for (let i = 0, ln = selectOptions.length; i < ln; i++) {
const isSelected = selectedValues.indexOf(selectOptions[i].value) >= 0;
const isSelected = selectedValues === selectOptions[i].value;
selectOptions[i].selected = isSelected;
}
}
Expand Down

0 comments on commit 2ec33a7

Please sign in to comment.