Closed nxp769 closed 11 months ago
Tried passing in enqueSnackBar hook it worked.
enqueueSnackbar('Loaded not Scheduled Work Orders!', { variant: 'success', anchorOrigin: { horizontal: 'right', vertical: 'bottom' }, closeSnackbar, });
It would be great if it's possible to include by default in the props.
Finally figured out import { closeSnackbar } from "notistack"
.
Issue resolved
Expected Behavior
I am passing a custom snack bar component using "Components" prop to SnackbarProvider. I want to access snackbar closing function from my custom snack bar component. `<SnackbarProvider Components={{ success: React.forwardRef((props, ref) => { console.log("========>", props) return ( <Alert ref={ref} onClose={() => {}} key={props.id} severity="success"
Current Behavior
I tried to log the props from the callback of success, but I do not see any function to close snackbar
Steps to Reproduce
Link:
1. 2. 3. 4.
Context
I want to close snack bar when onClose is triggered from Alert Component.
Your Environment