-
Notifications
You must be signed in to change notification settings - Fork 1
Description
I have a button on my page to reset all filter input above every column. This button has a parameter ‘clear’. I dont want to show every column of my table and I want the user to choose which ones. By default I want these columns to be disabled with ->setHiddenByDefault(true)
When I press this button, the table shows all columns. Even the ones who are disabled
Code now:
let table = new KilikTable("{{ table.id }}", "{{ table.path }}", JSON.parse('{{ table.options | json_encode | raw }}'));
table.afterReload = function () {
// Init plugins required for this table
};
{% if app.request.get('clear') == 'admin_table%}
table.skipLoadFromLocalStorage = true;
//tableLicenseOverzichtProduct.hiddenColumns = tableLicenseOverzichtProduct.defaultHiddenColumns;
{% endif %}
table.init();
The problem is that hiddenColumns is never set.
Temporary fix:
{% if app.request.get('clear') == 'admin_table' %}
table.skipLoadFromLocalStorage = true;
table.hiddenColumns = table.defaultHiddenColumns;
{% endif %}