Skip to content

Commit e4ff553

Browse files
authored
fix(dropdown): make "set text" work for custom actions
The set text behavior was not working for custom actions whereas such function internally calls the "set text" method. This PR also fixes showing all items before hiding when a non-multiple dropdown allowed additions
1 parent e123cb8 commit e4ff553

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/definitions/modules/dropdown.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1413,7 +1413,9 @@
14131413
module.remove.userAddition();
14141414
}
14151415
if (!settings.keepSearchTerm) {
1416-
module.remove.filteredItem();
1416+
if (module.is.multiple()) {
1417+
module.remove.filteredItem();
1418+
}
14171419
module.remove.searchTerm();
14181420
}
14191421
if (!module.is.visible() && $target.length > 0) {
@@ -2587,7 +2589,7 @@
25872589
} else {
25882590
$combo.text(text);
25892591
}
2590-
} else if (settings.action === 'activate') {
2592+
} else if (settings.action === 'activate' || isFunction(settings.action)) {
25912593
if (text !== module.get.placeholderText() || isNotPlaceholder) {
25922594
$text.removeClass(className.placeholder);
25932595
}

0 commit comments

Comments
 (0)