Update column properties when restoring persisted state

(cherry picked from commit 653db8290e0a7737348d911d322c4218c3b5b677)
pull/817/head
Mark McDowall 4 years ago committed by Qstick
parent e6ceafe0b7
commit faf8fbbc2a

@ -33,10 +33,13 @@ function mergeColumns(path, initialState, persistedState, computedState) {
// as long as they haven't been removed. // as long as they haven't been removed.
persistedColumns.forEach((persistedColumn) => { persistedColumns.forEach((persistedColumn) => {
const columnIndex = initialColumns.findIndex((i) => i.name === persistedColumn.name); const column = initialColumns.find((i) => i.name === persistedColumn.name);
if (columnIndex >= 0) { if (column) {
columns.push({ ...persistedColumn }); columns.push({
...column,
isVisible: persistedColumn.isVisible
});
} }
}); });

Loading…
Cancel
Save