I recently started using the tabulator library to create dynamic tables by setting autoColumns:true. Everything was working smoothly until I wanted to add header filters for each column. Despite referring to the documentation, I struggled to find a solution. Below is the snippet of my code:
init: function() {
var _this = this;
this.tabulator = new Tabulator("#example", {
autoColumns:true,
height:"500px",
movableColumns: true,
ajaxProgressiveLoad:"scroll",
paginationSize:20,
ajaxProgressiveLoadScrollMargin: 400,
ajaxLoader: true,
ajaxLoaderLoading: 'updating data',
ajaxProgressiveLoadDelay: 200,
ajaxResponse:function(url, params, response){
return {last_page: _this.iTotalPage, data: response};
}
});
this.setData();
},
setData: function() {
this.tabulator.setData("/tableData", {searchValue: this.sSerachValue});
},
I'm wondering if there's another way to add header filters without having to manually select columns using (this.tabulator.getColumns()) and mapping them to set filters function?