Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
mounted(){
//instantiate Tabulator when element is mounted
this.tabulator = new Tabulator('#data-table', {
reactiveData:true, //enable data reactivity
});
// Create API instance
this.api = new MockApi();
},
})
private drawTable(): void {
this.options.reactiveData = true;
this.options.layout = "fitColumns";
this.table = new Tabulator(this.tab, this.options);
document.getElementById('tabular-table').appendChild(this.tab);
}
}
if (~['publishedon', 'published', 'pub_date'].indexOf(sortField)) {
sortField = 'publishedon_combined';
}
initialSort.push({
column: sortField,
dir: view.sortDir
});
} else {
initialSort.push({
column: "publishedon_combined",
dir: "desc"
});
}
const table = new Tabulator(tableWrapper, {
ajaxURL: config.endpoint,
ajaxParams: {
action: 'get-collection',
collection: collection.id
},
ajaxConfig: {
credentials: 'same-origin',
headers: {
'X-Fred-Token': pluginTools.fredConfig.jwt
}
},
ajaxSorting: true,
columnHeaderSortMulti: false,
pagination: "remote",
paginationSize: 5,
ajaxFiltering: true,