Skip to content

Commit

Permalink
fix(dropdown): keep searchterm in menu search
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lubber-de authored Feb 11, 2024
1 parent 9bf4620 commit 6daf34d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/definitions/modules/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -1213,7 +1213,7 @@
if (!itemActivated && !pageLostFocus) {
if (settings.forceSelection) {
module.forceSelection();
} else if (!settings.allowAdditions) {
} else if (!settings.allowAdditions && !settings.keepSearchTerm && !module.has.menuSearch()) {
module.remove.searchTerm();
}
module.hide();
Expand Down

0 comments on commit 6daf34d

Please sign in to comment.