我使用带有远程分页的Ajax请求的制表器。当您使用标头筛选器时,您只过滤该页上的数据。当我的答案只有1页时,我想要做的是显示标题过滤器,如果它有超过1页,用户可能会混淆他正在过滤所有数据,而不仅仅是那个页面。
是否有以编程方式设置HeaderFilter=true
或false的方法?
this.tabulator = new Tabulator(this.$refs.table, {
index: "ANRID",
data: this.tableData, //link data to table
locale: true,
height:"400px",
responsiveLayout:"collapse",
pagination:"remote",
tooltips: true,
ajaxURL: "/anrs",
responsiveLayoutCollapseStartOpen:false,
columns: [
{title:"+", formatter:"responsiveCollapse", headerSort:false},
{title:"", formatter:editIcon, width:25, align:"center", headerSort:false},
{title: "ID", field:"ANRID", headerFilter: false},
{title:"Fideicomiso", field:"fideicomiso.FondosNombre", width: 150, headerFilter: false},
{title:"Actividad", field:"actividad", headerFilter: false},
]
});
发布于 2020-02-02 15:21:57
您需要更新受影响列的列定义,这可以在表上使用updateColumnDefinition函数进行,并指定列的字段:
table.updateColumnDefinition("name", {headerFilter:false})
如果有列组件,则可以调用列上的updateDefinition函数。
column.updateDefinition({headerFilter:false})
有关此列定义信息和其他列定义信息的更多信息可在列文档中找到。
https://stackoverflow.com/questions/59902275
复制相似问题