File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -242,7 +242,11 @@ class MultiSelect extends BaseComponent {
242242 }
243243
244244 update ( config ) {
245- this . _config = this . _getConfig ( config )
245+ if ( config . value ) {
246+ this . deselectAll ( )
247+ }
248+
249+ this . _config = { ...this . _config , ...this . _configAfterMerge ( config ) }
246250 this . _selected = [ ]
247251 this . _options = this . _getOptions ( )
248252 this . _menu . remove ( )
@@ -435,17 +439,19 @@ class MultiSelect extends BaseComponent {
435439
436440 for ( const node of nodes ) {
437441 if ( node . nodeName === 'OPTION' && node . value ) {
442+ const value = String ( node . value )
443+ const text = node . innerHTML
438444 const isSelected = node . selected || ( this . _config . value && this . _config . value . includes ( node . value ) )
439445 options . push ( {
440- value : node . value ,
441- text : node . innerHTML ,
446+ value,
447+ text,
442448 selected : isSelected ,
443449 disabled : node . disabled
444450 } )
445451
446452 if ( node . selected || isSelected ) {
447453 this . _selected . push ( {
448- value : node . value ,
454+ value,
449455 text : node . innerHTML ,
450456 ...node . disabled && { disabled : true }
451457 } )
You can’t perform that action at this time.
0 commit comments