Skip to content

Commit

Permalink
fix #916 MultiSelect#clear(silent) doesn't deselect silently
Browse files Browse the repository at this point in the history
  • Loading branch information
vegegoku committed Apr 14, 2024
1 parent efda29b commit 88aef41
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,15 @@ protected C clearValue(boolean silent) {
true,
field -> {
List<AbstractMenuItem<T>> selection = optionsMenu.getSelection();
new ArrayList<>(selection).forEach(AbstractMenuItem::deselect);
new ArrayList<>(selection)
.forEach(
item -> {
item.deselect(silent);
if (silent) {
OptionMeta.get(item)
.ifPresent(meta -> onOptionDeselected((O) meta.getOption(), silent));
}
});
});

if (!silent) {
Expand Down

0 comments on commit 88aef41

Please sign in to comment.