Skip to content

Commit 6daf34d

Browse files
authored
fix(dropdown): keep searchterm in menu search
Whenever a dropdown menu contains a separate search input to filter the menu items, the input value was removed when the field was blurred without selecting anything. This leaves the items filtered without a clue what to filter the next time the dropdown is opened again.
1 parent 9bf4620 commit 6daf34d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/definitions/modules/dropdown.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1213,7 +1213,7 @@
12131213
if (!itemActivated && !pageLostFocus) {
12141214
if (settings.forceSelection) {
12151215
module.forceSelection();
1216-
} else if (!settings.allowAdditions) {
1216+
} else if (!settings.allowAdditions && !settings.keepSearchTerm && !module.has.menuSearch()) {
12171217
module.remove.searchTerm();
12181218
}
12191219
module.hide();

0 commit comments

Comments
 (0)