Skip to content

Commit 1d55862

Browse files
authored
Merge pull request supabase-community#38 from supabase-community/fix/graph-viewport-initial-animation
fix: initial animation on graph viewport
2 parents 0fdbcb8 + 3d633bc commit 1d55862

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

apps/postgres-new/components/schema/table-graph.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,10 @@ export default function TablesGraph({
7373

7474
// `fitView` needs to happen during next event tick
7575
setTimeout(() => fitView(isFirstLoad ? 0 : 500), 0)
76-
setIsFirstLoad(false)
76+
77+
if (tables.length > 0) {
78+
setIsFirstLoad(false)
79+
}
7780
})
7881
}
7982
}, [reactFlowInstance, tables, resolvedTheme, fitView, isFirstLoad])

0 commit comments

Comments
 (0)