From 47bca8fcf30075cc4dac62bf2e0dc7678c17b636 Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Fri, 27 Oct 2023 05:15:20 +0000 Subject: [PATCH] fix: Fixed dnd for group by --- packages/nc-gui/components/smartsheet/grid/useColumnDrag.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/nc-gui/components/smartsheet/grid/useColumnDrag.ts b/packages/nc-gui/components/smartsheet/grid/useColumnDrag.ts index 4c2d6dfe49..7d6e356250 100644 --- a/packages/nc-gui/components/smartsheet/grid/useColumnDrag.ts +++ b/packages/nc-gui/components/smartsheet/grid/useColumnDrag.ts @@ -48,7 +48,11 @@ export const useColumnDrag = ({ e.dataTransfer.setData('text/plain', colId) draggedCol.value = fields.value.find((f) => f.id === colId) ?? null - dragColPlaceholderDomRef.value!.style.height = `${tableBodyEl.value?.getBoundingClientRect().height}px` + + const remInPx = parseFloat(getComputedStyle(document.documentElement).fontSize) + + const placeholderHeight = tableBodyEl.value?.getBoundingClientRect().height ?? 6.1 * remInPx + dragColPlaceholderDomRef.value!.style.height = `${placeholderHeight}px` const x = e.clientX - leftSidebarWidth.value