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 {
131131 this . _options = this . _getOptions ( )
132132 this . _popper = null
133133 this . _search = ''
134- this . _selected = this . _getSelectedOptions ( this . _options ) // TODO : change to this._selected
134+ this . _selected = this . _getSelectedOptions ( this . _options )
135135
136136 if ( this . _config . options . length > 0 ) {
137137 this . _createNativeSelect ( this . _config . options )
@@ -657,9 +657,9 @@ class MultiSelect extends BaseComponent {
657657 this . deselectAll ( )
658658 }
659659
660- if ( this . _selected . filter ( e => e . value === value ) . length === 0 ) {
660+ if ( this . _selected . filter ( option => option . value === String ( value ) ) . length === 0 ) {
661661 this . _selected . push ( {
662- value,
662+ value : String ( value ) ,
663663 text
664664 } )
665665 }
@@ -686,7 +686,7 @@ class MultiSelect extends BaseComponent {
686686 }
687687
688688 _deselectOption ( value ) {
689- const selected = this . _selected . filter ( e => e . value !== value )
689+ const selected = this . _selected . filter ( option => option . value !== String ( value ) )
690690 this . _selected = selected
691691
692692 SelectorEngine . findOne ( `option[value="${ value } "]` , this . _element ) . selected = false
You can’t perform that action at this time.
0 commit comments