File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,7 @@ const CLASS_NAME_TAG_DELETE = 'form-multi-select-tag-delete'
85
85
const Default = {
86
86
ariaCleanerLabel : 'Clear all selections' ,
87
87
cleaner : true ,
88
+ clearSearchOnSelect : false ,
88
89
container : false ,
89
90
disabled : false ,
90
91
invalid : false ,
@@ -108,6 +109,7 @@ const Default = {
108
109
const DefaultType = {
109
110
ariaCleanerLabel : 'string' ,
110
111
cleaner : 'boolean' ,
112
+ clearSearchOnSelect : 'boolean' ,
111
113
container : '(string|element|boolean)' ,
112
114
disabled : 'boolean' ,
113
115
invalid : 'boolean' ,
@@ -755,6 +757,12 @@ class MultiSelect extends BaseComponent {
755
757
this . search ( '' )
756
758
this . _searchElement . value = null
757
759
}
760
+
761
+ if ( this . _config . clearSearchOnSelect && this . _config . search ) {
762
+ this . search ( '' )
763
+ this . _searchElement . value = null
764
+ this . _searchElement . focus ( )
765
+ }
758
766
}
759
767
760
768
_findOptionByValue ( value , options = this . _options ) {
You can’t perform that action at this time.
0 commit comments