KingTable
KingTable copied to clipboard
Column Order based on query, not alphabetical
Is it possible to have the Column order match the order in the JSON, instead of alphabetical?
Hi @jschappet,
Please try the following: define a subclass of KingTable, overriding sortColumns
function to do nothing. This function is called upon initialization, to apply the first order to the columns, here in code.
class YourKingTable extends KingTable {
sortColumns() {
return this;
}
}
Then use your subclass.
You will still be able to set columns order by using the function setColumnsOrder
. I didn't test but it should work, that is why I use the word "try".