Browse Source

Fix resizable col on mini view not saving to state

master
jeffvli 3 years ago
committed by Jeff
parent
commit
2dabfaf51a
  1. 6
      src/components/viewtypes/ListViewTable.tsx

6
src/components/viewtypes/ListViewTable.tsx

@ -397,7 +397,9 @@ const ListViewTable = ({
settings.setSync(`miniListColumns[${resizedColumnIndex}].width`, newWidth); settings.setSync(`miniListColumns[${resizedColumnIndex}].width`, newWidth);
} }
const newCols = configState.lookAndFeel.listView[listType].columns.map((c: any) => { const newCols = configState.lookAndFeel.listView[
miniView ? 'mini' : listType
].columns.map((c: any) => {
if (c.dataKey === column.dataKey) { if (c.dataKey === column.dataKey) {
const { width, ...rest } = c; const { width, ...rest } = c;
return { width: newWidth, ...rest }; return { width: newWidth, ...rest };
@ -407,7 +409,7 @@ const ListViewTable = ({
}); });
dispatch( dispatch(
setColumnList({ setColumnList({
listType, listType: miniView ? 'mini' : listType,
entries: newCols, entries: newCols,
}) })
); );

Loading…
Cancel
Save