Reputation: 301
Please Anyone tell me how add tags dynamically on Tab and Spacebar event in ngx-chips.
Upvotes: 1
Views: 775
Reputation: 613
Use separatorKeyCodes (number[]) or separatorKeys (string[])
<div class="force-to-the-bottom">
<tag-input [ngModel]="['hardocoded-item']" [separatorKeyCodes]="[32,9]">
<tag-input-dropdown
[autocompleteItems]="items"
[showDropdownIfEmpty]="true"
[dynamicUpdate]="false">
</tag-input-dropdown>
Upvotes: 1