The hook `persistentStateSave` is called even when the option `persistentState` is set to false

Tags: #<Tag:0x00007fee3939d878>

Hello, Handsontable team,

According to the doc, the hook persistentStateSave is only exposed when the option persistentState is set true. However, it is still called when the column is manually moved even when the persistentState is set false.

It doesn’t check whether the persistentState is set to false.

Please check this fiddle:

Also, when calling the moveColumns/moveColumn, the hook persistentStateSave is not called even when the persistentState is set true. I am not sure if this is by design.


Thank you for sharing your insights. /the hook itself is called but nothing gets stored in the localStorage. We should update the description in the documentation. The same happens for the persistentStateLoad.

I have reported the alteration need in our main repository

Hi @aleksandra_budnik

Thanks for the quick response.

I guess this problem could be here:

Even when the persistentState is set to false, it will still calls the hook ‘persistentStateLoad’ .
As you said, since there is nothing in the localStorage, so no column is moved.

However, according to the doc, the hook persistentStateLoad is not even supposed to be called.

So, the doc is a little confusing.

That is true. That is why I have asked the team not to improve the description.

I’m closing this issue as done. Thank you for the feedback one again.