From fb43daab2af86d1ac69bc9f5b1ee05ff7f75b441 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Wed, 10 Aug 2022 12:13:46 +0530 Subject: [PATCH 01/15] fix(gui-v2): allow resetting column size of newly created column Signed-off-by: Pranav C --- packages/nc-gui-v2/composables/useGridViewColumnWidth.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/nc-gui-v2/composables/useGridViewColumnWidth.ts b/packages/nc-gui-v2/composables/useGridViewColumnWidth.ts index 6bd4bb5f2d..ebf2f3af81 100644 --- a/packages/nc-gui-v2/composables/useGridViewColumnWidth.ts +++ b/packages/nc-gui-v2/composables/useGridViewColumnWidth.ts @@ -19,7 +19,7 @@ export function useGridViewColumnWidth(view: Ref<(GridType & { id?: string }) | watch( // todo : update type in swagger - () => [gridViewCols, resizingCol, resizingColWidth, columns], + [gridViewCols, resizingCol, resizingColWidth], () => { let style = '' for (const c of columns?.value || []) { @@ -49,6 +49,9 @@ export function useGridViewColumnWidth(view: Ref<(GridType & { id?: string }) | loadCss() } + /** when columns changes(create/delete) reload grid columns */ + watch(columns, loadGridViewColumns) + const updateWidth = (id: string, width: string) => { if (gridViewCols?.value?.[id]) { gridViewCols.value[id].width = width From 4f4b979b4a545a3506e502403b7b11d78f7f5fa8 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Wed, 10 Aug 2022 15:26:13 +0530 Subject: [PATCH 02/15] fix(gui-v2): avoid triggering datepicker on contextmenu Signed-off-by: Pranav C --- .../nc-gui-v2/components/cell/DatePicker.vue | 24 +++++++++++++++---- .../components/cell/DateTimePicker.vue | 17 ++++++++++++- .../nc-gui-v2/components/cell/TimePicker.vue | 21 ++++++++++++++-- 3 files changed, 55 insertions(+), 7 deletions(-) diff --git a/packages/nc-gui-v2/components/cell/DatePicker.vue b/packages/nc-gui-v2/components/cell/DatePicker.vue index d69202b6ee..a492c25581 100644 --- a/packages/nc-gui-v2/components/cell/DatePicker.vue +++ b/packages/nc-gui-v2/components/cell/DatePicker.vue @@ -1,14 +1,16 @@