From 14299ce62a6c399668be40846a0d75a33052b3f9 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 10 Jan 2023 10:36:28 -0600 Subject: [PATCH] ScrollableList: update Virtuoso component types for v4 --- app/soapbox/components/scrollable-list.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/soapbox/components/scrollable-list.tsx b/app/soapbox/components/scrollable-list.tsx index 86e40570e..fae4b0f40 100644 --- a/app/soapbox/components/scrollable-list.tsx +++ b/app/soapbox/components/scrollable-list.tsx @@ -24,13 +24,13 @@ type SavedScrollPosition = { // NOTE: It's crucial to space lists with **padding** instead of margin! // Pass an `itemClassName` like `pb-3`, NOT a `space-y-3` className // https://virtuoso.dev/troubleshooting#list-does-not-scroll-to-the-bottom--items-jump-around -const Item: Components['Item'] = ({ context, ...rest }) => ( +const Item: Components['Item'] = ({ context, ...rest }) => (
); /** Custom Virtuoso List component for the outer container. */ // Ensure the className winds up here -const List: Components['List'] = React.forwardRef((props, ref) => { +const List: Components['List'] = React.forwardRef((props, ref) => { const { context, ...rest } = props; return
; });