From b7807776434c412668ef79ad03807e899cf771dc Mon Sep 17 00:00:00 2001 From: "J. Lewis" <6710419+lewxdev@users.noreply.github.com> Date: Mon, 12 Aug 2024 16:21:19 -0400 Subject: [PATCH] fix: jank horizontal scroll --- app/components/field.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/components/field.tsx b/app/components/field.tsx index 833faa0..089e766 100644 --- a/app/components/field.tsx +++ b/app/components/field.tsx @@ -24,7 +24,10 @@ export function Field() { getScrollElement: () => parentRef.current, }); const columnVirtualizer = useVirtualizer({ - ...rowVirtualizer.options, + count: size, + gap: GAP_SIZE * 16, + estimateSize: () => GRID_SIZE * 16, + getScrollElement: () => parentRef.current, horizontal: true, });