Skip to content

Commit 686c8b5

Browse files
authored
fix(dropdown):respect keepsearchterm on enter selection
When keepSearchTerm=true and allowAdditions=true and also selecting a result item via cursor and enter key form the list, the searchterm will always be removed, which this PR fixes.
1 parent 62260b0 commit 686c8b5

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
@@ -1620,7 +1620,7 @@
16201620
module.verbose('Selecting item from keyboard shortcut', $selectedItem);
16211621
module.event.item.click.call($selectedItem, event);
16221622
}
1623-
if (module.is.searchSelection()) {
1623+
if (module.is.searchSelection() && !settings.keepSearchTerm) {
16241624
module.remove.searchTerm();
16251625
}
16261626
if (module.is.multiple()) {

0 commit comments

Comments
 (0)