From 810073781771abaafd208550e04b68146ce244d6 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 13 Apr 2023 12:05:47 +0100 Subject: [PATCH] Fix double click resizing of sticky column --- .../src/components/sheet/stores/columns.js | 3 +-- .../src/components/sheet/stores/resize.js | 12 ------------ 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/packages/frontend-core/src/components/sheet/stores/columns.js b/packages/frontend-core/src/components/sheet/stores/columns.js index 57919d881b..b43be2b126 100644 --- a/packages/frontend-core/src/components/sheet/stores/columns.js +++ b/packages/frontend-core/src/components/sheet/stores/columns.js @@ -120,8 +120,7 @@ export const deriveStores = context => { } stickyColumn.set({ name: primaryDisplay, - width: - existing?.width || schema[primaryDisplay].width || DefaultColumnWidth, + width: schema[primaryDisplay].width || DefaultColumnWidth, left: gutterWidth, schema: schema[primaryDisplay], idx: "sticky", diff --git a/packages/frontend-core/src/components/sheet/stores/resize.js b/packages/frontend-core/src/components/sheet/stores/resize.js index 00a58737db..af46fa6628 100644 --- a/packages/frontend-core/src/components/sheet/stores/resize.js +++ b/packages/frontend-core/src/components/sheet/stores/resize.js @@ -99,18 +99,6 @@ export const deriveStores = context => { // Resets a column size back to default const resetSize = async column => { - // let columnIdx = get(columns).findIndex(col => col.name === column.name) - // if (columnIdx === -1) { - // stickyColumn.update(state => ({ - // ...state, - // width: DefaultColumnWidth, - // })) - // } else { - // columns.update(state => { - // state[columnIdx].width = DefaultColumnWidth - // return [...state] - // }) - // } await columns.actions.updateColumnWidth(column.name, DefaultColumnWidth) }