在ngx-chips中的Tab和Spacebar事件上动态添加标签

高塔姆·夏尔马

请任何人告诉我如何在ngx-chips中的Tab和Spacebar事件上动态添加标签。

ngx芯片

尼丁·拉旺德

使用spacerKeyCodes(number [])或spacerKeys(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>

https://stackblitz.com/edit/ngx-chips-example-miqu3i?file=app%2Fshared%2Ftag-input%2Ftag-input.component.html

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章