Skip to content

Commit

Permalink
Merge pull request primefaces#15633 from primefaces/issue-15118
Browse files Browse the repository at this point in the history
Fixed primefaces#15118 - Multiselect | onRemove event not getting emitted
  • Loading branch information
cetincakiroglu authored May 30, 2024
2 parents d4daba0 + e4dfac1 commit bb303af
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 bb303af

Please sign in to comment.