File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
src/bundle/Resources/public/ts/components/dropdown Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ export class DropdownMultiInput extends BaseDropdown {
1616 const _sourceInputNode = this . _sourceNode . querySelector < HTMLSelectElement > ( 'select' ) ;
1717
1818 if ( ! _sourceInputNode ) {
19- throw new Error ( 'DropdownSingleInput : Required elements are missing in the container.' ) ;
19+ throw new Error ( 'DropdownMultiInput : Required elements are missing in the container.' ) ;
2020 }
2121
2222 this . _sourceInputNode = _sourceInputNode ;
@@ -51,7 +51,7 @@ export class DropdownMultiInput extends BaseDropdown {
5151 this . _sourceInputNode . appendChild ( option ) ;
5252 } ) ;
5353
54- this . setValue ( this . _sourceInputNode . value ) ;
54+ this . setValues ( this . getSelectedValuesFromSource ( ) ) ;
5555 }
5656
5757 protected setSourceValue ( id : string , actionPerformed : DropdownMultiInputAction ) {
@@ -108,7 +108,11 @@ export class DropdownMultiInput extends BaseDropdown {
108108
109109 this . _value = [ ] ;
110110
111- tempValue . forEach ( ( value ) => {
111+ this . setValues ( tempValue ) ;
112+ }
113+
114+ public setValues ( values : string [ ] ) {
115+ values . forEach ( ( value ) => {
112116 this . setValue ( value ) ;
113117 } ) ;
114118 }
You can’t perform that action at this time.
0 commit comments