Skip to content

Commit fe84141

Browse files
authored
Merge pull request #2671 from Akshat55/multi-select-combobox
fix: Emit selected event for multiselect
2 parents b972ca4 + 3e8cc67 commit fe84141

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/combobox/combobox.component.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,7 @@ export class ComboBox implements OnChanges, AfterViewInit, AfterContentInit, OnD
483483
} else {
484484
this.propagateChangeCallback(this.view.getSelected());
485485
}
486+
this.selected.emit(event);
486487
}
487488
} else {
488489
// If type is single, dropdown list will emit an object
@@ -509,12 +510,10 @@ export class ComboBox implements OnChanges, AfterViewInit, AfterContentInit, OnD
509510
if (!isUpdate(event)) {
510511
this.elementRef.nativeElement.querySelector("input").focus();
511512
this.view.filterBy("");
513+
this.selected.emit(event.item);
512514
}
513515
this.closeDropdown();
514516
}
515-
if (!isUpdate(event) && !Array.isArray(event)) {
516-
this.selected.emit(event.item);
517-
}
518517
});
519518
// update the rest of combobox with any pre-selected items
520519
// setTimeout just defers the call to the next check cycle

0 commit comments

Comments
 (0)