From 2dabfaf51a6b9be14317ec790c6fee43fd04ff4e Mon Sep 17 00:00:00 2001 From: jeffvli Date: Tue, 2 Nov 2021 17:51:55 -0700 Subject: [PATCH] Fix resizable col on mini view not saving to state --- src/components/viewtypes/ListViewTable.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/viewtypes/ListViewTable.tsx b/src/components/viewtypes/ListViewTable.tsx index 949b87e..dfd9fe2 100644 --- a/src/components/viewtypes/ListViewTable.tsx +++ b/src/components/viewtypes/ListViewTable.tsx @@ -397,7 +397,9 @@ const ListViewTable = ({ 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) { const { width, ...rest } = c; return { width: newWidth, ...rest }; @@ -407,7 +409,7 @@ const ListViewTable = ({ }); dispatch( setColumnList({ - listType, + listType: miniView ? 'mini' : listType, entries: newCols, }) );