Skip to content

Commit ffe1810

Browse files
committed
fix(MultiSelect): get options label from an internal array instead of DOM to avoid inconsistency when the option contains text that resembles an HTML tag, ex. >, <
1 parent 989d8c8 commit ffe1810

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/src/multi-select.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ class MultiSelect extends BaseComponent {
649649
}
650650

651651
const value = String(element.dataset.value)
652-
const text = element.textContent
652+
const { text } = this._options.find(option => option.value === value)
653653

654654
if (this._config.multiple && element.classList.contains(CLASS_NAME_SELECTED)) {
655655
this._deselectOption(value)

0 commit comments

Comments
 (0)