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'
8585const Default = {
8686 ariaCleanerLabel : 'Clear all selections' ,
8787 cleaner : true ,
88+ clearSearchOnSelect : false ,
8889 container : false ,
8990 disabled : false ,
9091 invalid : false ,
@@ -108,6 +109,7 @@ const Default = {
108109const DefaultType = {
109110 ariaCleanerLabel : 'string' ,
110111 cleaner : 'boolean' ,
112+ clearSearchOnSelect : 'boolean' ,
111113 container : '(string|element|boolean)' ,
112114 disabled : 'boolean' ,
113115 invalid : 'boolean' ,
@@ -755,6 +757,12 @@ class MultiSelect extends BaseComponent {
755757 this . search ( '' )
756758 this . _searchElement . value = null
757759 }
760+
761+ if ( this . _config . clearSearchOnSelect && this . _config . search ) {
762+ this . search ( '' )
763+ this . _searchElement . value = null
764+ this . _searchElement . focus ( )
765+ }
758766 }
759767
760768 _findOptionByValue ( value , options = this . _options ) {
You can’t perform that action at this time.
0 commit comments