【发布时间】:2020-07-15 12:37:53
【问题描述】:
请任何人告诉我如何在 ngx-chips 中的 Tab 和 Spacebar 事件上动态添加标签。
【问题讨论】:
请任何人告诉我如何在 ngx-chips 中的 Tab 和 Spacebar 事件上动态添加标签。
【问题讨论】:
使用 separatorKeyCodes (number[]) 或 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>
【讨论】: