Updating columns resets sort state

Tags: #<Tag:0x00007efc64950878> #<Tag:0x00007efc649506e8>

I have a case where I need to update some columns and it seems that if the table currently has a sort applied, that sort is removed.

Here’s an example:
https://jsfiddle.net/pvk6tz1j/

After sorting one of the sortable columns, I call updateSettings({ columns }), and even if those columns are the value from getSettings().columns it resets the sort.

In my case I may only need to update a single column, but I don’t see another way to do this besides updateSettings().

Is there a way to update columns without reverting column state?

Is there a way to save and restore the column state after updates to the columns?

Hi @abeall

It is known issue, updateSettings is resetting cell meta in the table. At the moment we are trying to find a way how to solve this problem. I can update you when we will start working on it.

Is there a GH issue I can follow?

No, currently there isn’t a specific GH issue.

@abeall

Actually, there is one general issue that you can track :slight_smile:

Thanks. Any suggestions for a workaround on my specific issue (updating columns) in the meantime?

This issue was solved in v. 12.

1 Like