【问题标题】:Passing already grouped options to angular ui-select将已分组的选项传递给角度 ui-select
【发布时间】:2014-10-07 12:26:18
【问题描述】:

是否有可能以某种方式将已经摸索的选项传递给 angular ui-select,例如 jquery select2 Grouping results in Select2?对我来说不可能使用group-by,因为有些选项没有父选项。

[     
      {id: 3, text: "Item name 3 without parent."},
      {text: "Group name", children: [
          {id: 1, text: "Item name 1"}, 
          {id: 2, text: "Item name 2"}
      ]}
    ]

【问题讨论】:

    标签: angularjs ui-select2


    【解决方案1】:

    您可能已经解决了这个问题,但供将来参考:

    当某些元素没有父元素时,select.ui 将为它们创建一个无名组并显示在列表的开头。所以在这种情况下你可以使用 group-by。

    【讨论】:

    • 哈,是的,因为ui-select 0.9.6 它工作正常。谢谢。
    猜你喜欢
    • 2017-03-25
    • 2013-03-08
    • 2015-02-03
    • 1970-01-01
    • 1970-01-01
    • 2021-12-22
    • 1970-01-01
    • 1970-01-01
    • 2013-06-25
    相关资源
    最近更新 更多