Skip to content

Commit

Permalink
fix(vertical-menu): fixed 'containerRef' error (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
megaacheyounes authored Mar 29, 2023
1 parent 9ae792b commit c55709b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ const Navigation = props => {
/>
<Box sx={{ height: '100%', position: 'relative', overflow: 'hidden' }}>
<ScrollWrapper
containerRef={ref => handleInfiniteScroll(ref)}
{...(hidden
? {
onScroll: container => scrollMenu(container),
sx: { height: '100%', overflowY: 'auto', overflowX: 'hidden' }
}
: {
options: { wheelPropagation: false },
onScrollY: container => scrollMenu(container)
onScrollY: container => scrollMenu(container),
containerRef: ref => handleInfiniteScroll(ref)
})}
>
{beforeVerticalNavMenuContent ? beforeVerticalNavMenuContent(props) : null}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,15 @@ const Navigation = (props: Props) => {
<Box sx={{ height: '100%', position: 'relative', overflow: 'hidden' }}>
{/* @ts-ignore */}
<ScrollWrapper
containerRef={(ref: any) => handleInfiniteScroll(ref)}
{...(hidden
? {
onScroll: (container: any) => scrollMenu(container),
sx: { height: '100%', overflowY: 'auto', overflowX: 'hidden' }
}
: {
options: { wheelPropagation: false },
onScrollY: (container: any) => scrollMenu(container)
onScrollY: (container: any) => scrollMenu(container),
containerRef: (ref: any) => handleInfiniteScroll(ref)
})}
>
{beforeVerticalNavMenuContent ? beforeVerticalNavMenuContent(props) : null}
Expand Down

0 comments on commit c55709b

Please sign in to comment.