Skip to content

Commit

Permalink
fix #939 calling clear value for multiselect box will repeat the call…
Browse files Browse the repository at this point in the history
… for change listener by the number of selected items.
  • Loading branch information
vegegoku committed Jul 14, 2024
1 parent 965e95e commit 5663ae4
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,15 @@ protected C clearValue(boolean silent) {
new ArrayList<>(selection)
.forEach(
item -> {
item.deselect(silent);
if (silent) {
OptionMeta.get(item)
.ifPresent(meta -> onOptionDeselected((O) meta.getOption(), silent));
}
withPausedChangeListeners(
select -> {
item.deselect(silent);
if (silent) {
OptionMeta.get(item)
.ifPresent(
meta -> onOptionDeselected((O) meta.getOption(), silent));
}
});
});
});

Expand Down

0 comments on commit 5663ae4

Please sign in to comment.