From e5ef00f1b3c39892366fdb5c8f24f47e6ae66378 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Fri, 3 Feb 2023 11:23:02 +0530 Subject: [PATCH] fix(gui): scroll to active cell Signed-off-by: Pranav C --- packages/nc-gui/components/smartsheet/Grid.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/nc-gui/components/smartsheet/Grid.vue b/packages/nc-gui/components/smartsheet/Grid.vue index 2997582cf6..644cd28bb9 100644 --- a/packages/nc-gui/components/smartsheet/Grid.vue +++ b/packages/nc-gui/components/smartsheet/Grid.vue @@ -283,6 +283,12 @@ const { activeCell.row = data.value.length - 1 activeCell.col = 0 resetSelectedRange() + nextTick(() => { + ;(document.querySelector('td.cell.active') as + | HTMLInputElement + | HTMLTextAreaElement + )?.scrollIntoView({ behavior: 'smooth' }) + }) } break }