From 4105b3fb459aaca0cbb8f459c3fab65f46c8c4a6 Mon Sep 17 00:00:00 2001 From: moon-ds Date: Fri, 20 Oct 2023 17:00:57 +0500 Subject: [PATCH] fix: the minimap is not displayed in the example --- workspaces/tables/src/components/Minimap.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/workspaces/tables/src/components/Minimap.tsx b/workspaces/tables/src/components/Minimap.tsx index b27309be5d..4821e674e6 100644 --- a/workspaces/tables/src/components/Minimap.tsx +++ b/workspaces/tables/src/components/Minimap.tsx @@ -30,12 +30,12 @@ const Minimap = ({ tableRef, footerRef, numberOfColumns }: MinimapProps) => { borderColor: 'rgb(var(--piccolo))', }); - setVisible(true); + setVisible(false); if (timeoutId) clearTimeout(timeoutId); timeoutId = setTimeout(() => { - setVisible(false); + setVisible(true); }, TIMEOUT); }, [tableRef]); useEffect(() => { @@ -61,6 +61,7 @@ const Minimap = ({ tableRef, footerRef, numberOfColumns }: MinimapProps) => { 'pointer-events-none transition-opacity', visible ? 'opacity-1' : 'opacity-0' )} + ref={(tab: HTMLDivElement) => { tableRef.current = tab }} >