fix: restore horizontal scroll sync after Radix ScrollArea removal (#518)

This commit is contained in:
Mathis Boulais
2025-08-05 12:57:47 +02:00
committed by GitHub
parent efbbc48bc5
commit 9c6556ea05
@@ -513,15 +513,9 @@ export function Timeline() {
// --- Scroll synchronization effect --- // --- Scroll synchronization effect ---
useEffect(() => { useEffect(() => {
const rulerViewport = rulerScrollRef.current?.querySelector( const rulerViewport = rulerScrollRef.current;
"[data-radix-scroll-area-viewport]" const tracksViewport = tracksScrollRef.current;
) as HTMLElement; const trackLabelsViewport = trackLabelsScrollRef.current;
const tracksViewport = tracksScrollRef.current?.querySelector(
"[data-radix-scroll-area-viewport]"
) as HTMLElement;
const trackLabelsViewport = trackLabelsScrollRef.current?.querySelector(
"[data-radix-scroll-area-viewport]"
) as HTMLElement;
if (!rulerViewport || !tracksViewport) return; if (!rulerViewport || !tracksViewport) return;