LM
02-28-2023Data Storage
Sorting Table
Hello, I have created an "Aggregated Table" widget using this plugin. Using this, sorting the table by only one column is supported. Is it possible to sort the table based on 2 columns in d...
Hi LM ,
We can add one more column to the table for sorting.
It can have different content:
After that, you will need to sort the table by this field.
We can add a script to hide that cutom column.
And in order to prevent the user from accidentally sorting by other fields, we will hide sorting from headers.
let colIndex = 0;
widget.on("render", function(se,ev){
se.style.tableState.columns[colIndex].visible = false;
})
widget.on('domready',function(){
$('.tw-sort-head ', element).css('display', 'none');
})
I hope this helps or points you in the right direction.
Always here to help,
Angelina from QBeeQ
[email protected]