【问题标题】:ngx-chips, when disable attribute is set to false the tag-input-dropdown displaysngx-chips,当禁用属性设置为 false 时,显示标签输入下拉菜单
【发布时间】:2019-04-17 16:28:25
【问题描述】:

使用 ngx-chips 时,我有一个禁用输入的按钮。启用输入后,标签输入下拉菜单会显示为好像用户单击了输入字段。

这是stackblitz上此问题的工作演示

我尝试在链接到 disable 变量的 tag-input-dropdown 上使用 ngIf,尽管这解决了我的特定问题,但它破坏了搜索功能。

我已向 ngx-chips github page 添加了一个错误报告,但由于可能需要一段时间才能查看此问题,是否有人对此有任何修复建议?

【问题讨论】:

    标签: angular ngx-chips


    【解决方案1】:

    我在ngx-chips GitHub page 上收到了关于将 [keepOpen]="false" 添加到我的标签输入下拉菜单的回复,这解决了禁用该字段的问题。

    <tag-input-dropdown
        [appendToBody]="true"
        [showDropdownIfEmpty]="true"
        [keepOpen]="false"
        [autocompleteItems]="tagItems"
        [identifyBy]="'id'"
        [displayBy]="'title'">
    </tag-input-dropdown>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-01-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-02-10
      • 1970-01-01
      • 2020-08-31
      相关资源
      最近更新 更多