I have a handson table in my project and the persistentState is set to true.
manual column move also set as true.
When dragging and dropping the column in another position, the local storage has been created with the Id followed by manualColumnMove key.
The value in the local storage also correct and it is not cleared even after refreshing the page.
The issue is the column order is not correct as per the local storage.
Below is my code.
{!calcDisabled ? (
<HotTable
{…{
id: ‘admin-test-task-table’,
// colHeaders: true,
persistentState: true,
rowHeaders: true,
autoColumnSize: false,
autoRowSize: false,
colHeaders: tableColumns,
manualColumnFreeze: true,
contextMenu: true,
stretchH: ‘all’,
manualRowMove: true,
manualColumnMove: true,
manualColumnResize: true,
manualColumnHide: true,
hiddenColumns: {
columns: [0],
},
formulas: formulasEngineConfig,
ref: tableRef,
data: tableData,
licenseKey: ‘non-commercial-and-evaluation’,
// afterChange: updateNamedExpressions,
tableClassName: ‘table-template’,
className: ‘table-cell’,
beforeRemoveRow: handleBeforeRemoveRow,
afterChange: handleAfterChange,
afterRowMove: handleRowMove,
}}
/>
) : (
<HotTable
{…{
id: ‘admin-test-task-table’,
persistentState: true,
// colHeaders: true,
rowHeaders: true,
autoColumnSize: false,
autoRowSize: false,
colHeaders: tableColumns,
manualColumnFreeze: true,
contextMenu: true,
stretchH: ‘all’,
manualRowMove: true,
manualColumnMove: true,
manualColumnResize: true,
manualColumnHide: true,
hiddenColumns: true,
ref: tableRef,
data: tableData,
licenseKey: ‘non-commercial-and-evaluation’,
// afterChange: updateNamedExpressions,
tableClassName: ‘table-template’,
className: ‘table-cell’,
beforeRemoveRow: handleBeforeRemoveRow,
afterChange: handleAfterChange,
afterRowMove: handleRowMove,
}}
/>
)}
Kindly help me on this