Skip to content

Commit

Permalink
Fixed primefaces#15118 - Multiselect | onRemove event not getting emi…
Browse files Browse the repository at this point in the history
…tted
  • Loading branch information
mehmetcetin01140 committed May 21, 2024
1 parent c42b73b commit e4dfac1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/components/multiselect/multiselect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1355,9 +1355,9 @@ export class MultiSelect implements OnInit, AfterViewInit, AfterContentInit, Aft

let selected = this.isSelected(option);
let value = null;

if (selected) {
value = this.modelValue().filter((val) => !ObjectUtils.equals(val, this.getOptionValue(option), this.equalityKey()));
this.onRemove.emit({ newValue: this.value, removed: this.getOptionValue(option) });
} else {
value = [...(this.modelValue() || []), this.getOptionValue(option)];
}
Expand Down

0 comments on commit e4dfac1

Please sign in to comment.