Skip to content

Commit

Permalink
Pass onClick to RefreshIconButton from LoadingIndicator
Browse files Browse the repository at this point in the history
  • Loading branch information
david-bezero committed Nov 3, 2023
1 parent 8840592 commit d7409c6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/ra-ui-materialui/src/layout/LoadingIndicator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { RefreshIconButton } from '../button';
import { SxProps } from '@mui/system';

export const LoadingIndicator = (props: LoadingIndicatorProps) => {
const { className, sx, ...rest } = props;
const { className, onClick, sx, ...rest } = props;
const loading = useLoading();

const theme = useTheme();
Expand All @@ -20,6 +20,7 @@ export const LoadingIndicator = (props: LoadingIndicatorProps) => {
className={`${LoadingIndicatorClasses.loadedIcon} ${
loading && LoadingIndicatorClasses.loadedLoading
}`}
onClick={onClick}
/>
{loading && (
<CircularProgress
Expand All @@ -45,6 +46,7 @@ LoadingIndicator.propTypes = {

interface LoadingIndicatorProps {
className?: string;
onClick?: (e: MouseEvent) => void;
sx?: SxProps;
}

Expand Down

0 comments on commit d7409c6

Please sign in to comment.