Skip to content

Commit

Permalink
fix: scroll container with tanstack virtual (#1761)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xKheops authored Dec 19, 2024
1 parent 66a31f4 commit 0fdb106
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/extension/src/@talisman/components/ScrollContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ export const ScrollContainer = forwardRef<HTMLDivElement, ScrollContainerProps>(
innerClassName,
)}
>
<ScrollContainerProvider refContainer={refDiv}>{children}</ScrollContainerProvider>
{/* In case of suspense, revDiv.current might be null on first render. This causes problems with child row virtualizers which memoize it, on production builds only */}
{!!refDiv.current && (
<ScrollContainerProvider refContainer={refDiv}>{children}</ScrollContainerProvider>
)}
</div>
<div
className={classNames(
Expand Down

0 comments on commit 0fdb106

Please sign in to comment.