Skip to content

Commit

Permalink
fix: force overflow-y scroll to prevent grid offset on mount
Browse files Browse the repository at this point in the history
  • Loading branch information
robinpyon committed Jul 3, 2023
1 parent ea549e1 commit 804e125
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/AssetGridVirtualized/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const ItemContainer = styled.div`
const ListContainer = styled.div`
display: grid;
grid-template-columns: repeat(auto-fill, ${CARD_WIDTH}px);
grid-template-rows: repeat(auto-fill, ${CARD_HEIGHT}px);
justify-content: center;
margin: 0 auto;
`
Expand Down Expand Up @@ -71,7 +72,7 @@ const AssetGridVirtualized = (props: Props) => {
return <VirtualCell item={item} selected={selected} />
}}
overscan={48}
style={{overflowX: 'hidden'}}
style={{overflowX: 'hidden', overflowY: 'scroll'}}
totalCount={totalCount}
/>
)
Expand Down

0 comments on commit 804e125

Please sign in to comment.