【问题标题】:Filter all fields in Tabulator过滤制表器中的所有字段
【发布时间】:2019-07-18 12:44:33
【问题描述】:

我希望为我的Tabulator Datagrid 提供一个搜索字段,其中搜索将在我的搜索标准的制表符的所有字段中找到所有匹配项。如果可能的话,我想使用 Filter-API。非常喜欢 (DataTables)。

我在文档中看到了“应用多个过滤器”部分,想知道这是否是实现此目的的唯一方法?也许已经有一个 API 可以满足我的需求?

【问题讨论】:

    标签: tabulator


    【解决方案1】:

    你也可以嵌套filters

    table.setFilter([
        {field:"age", type:">", value:52}, //filter by age greater than 52
        [
            {field:"height", type:"<", value:142}, //with a height of less than 142
            {field:"name", type:"=", value:"steve"}, //or a name of steve
        ]
    ]);
    

    【讨论】:

      猜你喜欢
      • 2020-09-17
      • 2013-06-15
      • 2016-01-02
      • 2022-01-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-11-18
      相关资源
      最近更新 更多