File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ class MultiSelect extends BaseComponent {
131
131
this . _options = this . _getOptions ( )
132
132
this . _popper = null
133
133
this . _search = ''
134
- this . _selected = this . _getSelectedOptions ( this . _options ) // TODO : change to this._selected
134
+ this . _selected = this . _getSelectedOptions ( this . _options )
135
135
136
136
if ( this . _config . options . length > 0 ) {
137
137
this . _createNativeSelect ( this . _config . options )
@@ -657,9 +657,9 @@ class MultiSelect extends BaseComponent {
657
657
this . deselectAll ( )
658
658
}
659
659
660
- if ( this . _selected . filter ( e => e . value === value ) . length === 0 ) {
660
+ if ( this . _selected . filter ( option => option . value === String ( value ) ) . length === 0 ) {
661
661
this . _selected . push ( {
662
- value,
662
+ value : String ( value ) ,
663
663
text
664
664
} )
665
665
}
@@ -686,7 +686,7 @@ class MultiSelect extends BaseComponent {
686
686
}
687
687
688
688
_deselectOption ( value ) {
689
- const selected = this . _selected . filter ( e => e . value !== value )
689
+ const selected = this . _selected . filter ( option => option . value !== String ( value ) )
690
690
this . _selected = selected
691
691
692
692
SelectorEngine . findOne ( `option[value="${ value } "]` , this . _element ) . selected = false
You can’t perform that action at this time.
0 commit comments