Keep first inserted grid row visible while editing

This commit is contained in:
Caisin authored and GitHub committed 2026-06-29 11:16:38 +08:00
1 parent b29fd75e99
commit fd46869c14
1 file changed
+10 -1
+10 -1
View File
@@ -4883,7 +4883,16 @@ function drawCanvasGrid() {
});
}
watch(useCanvasGridRows, () => nextTick(attachCanvasResizeObserver), { immediate: true });
watch(
[useCanvasGridRows, hasVisibleRows],
() => {
// When an empty table gets its first pending row, the canvas scroller is created by
// the v-if branch after the original mount-time observer attempt has already no-op'd.
// Reattach after that branch mounts so the canvas/overlay get real viewport dimensions.
nextTick(attachCanvasResizeObserver);
},
{ immediate: true },
);
watch(showDataGridTopbar, () => nextTick(observeDataGridTopbarWidth), { immediate: true });
watch(
[