I'm using ngx-chips, but I can't implement the OnSelected function.
In my app.component.html I have this:
<div class="force-to-the-bottom">
<tag-input [ngModel]="[]"
(onSelect)="onSelected($event)"
(onRemove)="onItemRemoved($event)">
<tag-input-dropdown
[autocompleteItems]="items"
[showDropdownIfEmpty]="true"
[dynamicUpdate]="false"
>
</tag-input-dropdown>
</tag-input>
</div>
In my app.component.ts the functions are implemented in this simple way:
onSelected($event: any) {
console.log("Fire Selected");
}
onItemRemoved($event: any) {
console.log("Fire Removed");
}
The very strange thing is that onItemRemoved works properly, while onSelected not fire.
This is my StackBlitz
I can't understand what I'm doing wrong.
Can someone help me?
Thanks