Skip to content

Commit

Permalink
fix(ClickAwayListener): add forwardRef to ClickAwayListener component
Browse files Browse the repository at this point in the history
  • Loading branch information
capricorn-32 committed Dec 23, 2024
1 parent 564c365 commit dcafc8e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/base/ClickAwayListener/ClickAwayListener.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ import {
ClickAwayListener as MuiClickAwayListener,
type ClickAwayListenerProps
} from '@mui/material';
import React from 'react';

export function ClickAwayListener(props: ClickAwayListenerProps): JSX.Element {
return <MuiClickAwayListener {...props} />;
}
const ClickAwayListener = React.forwardRef<HTMLDivElement, ClickAwayListenerProps>((props, ref) => {
return <MuiClickAwayListener {...props} ref={ref} />;
});

export default ClickAwayListener;

0 comments on commit dcafc8e

Please sign in to comment.