From e4dfac121f166f0e26ff33a5be49867fcabcf01d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20=C3=87etin?= <92744169+mehmetcetin01140@users.noreply.github.com> Date: Tue, 21 May 2024 10:20:47 +0300 Subject: [PATCH] Fixed #15118 - Multiselect | onRemove event not getting emitted --- src/app/components/multiselect/multiselect.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/multiselect/multiselect.ts b/src/app/components/multiselect/multiselect.ts index 171ef381b35..f73f6efbd49 100755 --- a/src/app/components/multiselect/multiselect.ts +++ b/src/app/components/multiselect/multiselect.ts @@ -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)]; }