制表符:有没有办法让 HeaderFilter 使用格式化值而不是原始数据值

Tabulator: Is there a way to have the HeaderFilter use the Formatted Values rather than the Raw Data Values

我有一个制表符 table,其中有一列包含 DateTimeOffsetValues,例如 '2020-01-07T13:23:00.000 +01:00',正在使用内置日期时间格式进行格式化。

列在显示数据时工作正常,但在使用 HeaderFiltering 时,所有值都是原始数据值。

有没有一种简单的方法可以让提供给 HeaderFiltering 的值使用格式化值?我没有在文档中找到任何关于将格式化程序应用于自动生成的 headerfilter 值的内容,但我可能遗漏了一些东西。

我在下面包含了列定义:

 {
    "field": "AuditDate",
    "title": "Audit Date",
    "visible": true,
    "formatter": "datetime",
    "formatterParams": {
      "inputFormat": null,
      "outputFormat": "DD/MM/YYYY",
      "invalidPlaceholder": null
    },
    "headerFilter": "autocomplete",
    "headerFilterParams": {
      "allowEmpty": true,
      "showListOnEmpty": true,
      "values": true,
      "multiselect": true
    },
    "headerSort": true,
    "editor": "",
    "editorOptions": null,
    "position": 41,
    "cellClick": function (e,row) {auditDateCellClick ( e, row ); }
  }

您可以创建一个 Custom Formatter 以您想要的方式运行。

或者您可以考虑使用 Mutator 而不是格式化程序。这将改变基础数据,而不仅仅是它的显示方式,允许您以这种方式过滤它