File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 79
79
$: {
80
80
innerOptions = verifySelectedOptions (innerOptions, selectedValues);
81
81
refOptions = verifySelectedOptions (innerOptions, selectedValues);
82
+ applySearchFilter ();
82
83
changeDisplayText ();
83
84
}
84
85
104
105
... newOptions
105
106
];
106
107
108
+ changeDisplayText ();
109
+ } else {
110
+ applySearchFilter ();
107
111
changeDisplayText ();
108
112
}
109
113
} else {
110
114
innerOptions = verifySelectedOptions (options, selectedValues);
111
115
refOptions = verifySelectedOptions (options, selectedValues);
116
+ applySearchFilter ();
112
117
changeDisplayText ();
113
118
}
114
119
}
162
167
/** @param {any} e */
163
168
function changeSearchValue (e ) {
164
169
searchValue = e .target .value || ' ' ;
170
+ applySearchFilter ();
171
+ verifySelectAll ();
172
+ }
173
+
174
+ function applySearchFilter () {
165
175
const innerValue = searchValue .toLowerCase ();
166
176
167
177
if (searchValue) {
168
178
innerOptions = [... refOptions .filter (x => x .label .toLowerCase ().includes (innerValue))];
169
179
} else {
170
180
innerOptions = [... refOptions];
171
181
}
172
-
173
- verifySelectAll ();
174
182
}
175
183
176
-
177
184
/**
178
185
* @param {any} e
179
186
* @param {any} option
You can’t perform that action at this time.
0 commit comments