You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What you were expecting:
The notification to stay as long as the number of seconds added in the third param What happened instead:
The notification still uses the default timer and auto hides Steps to reproduce:
I imported
import { useNotify,useSafeSetState} from "react-admin";
const notify=useNotify();
notify("An email has been sent to you. Please check your SPAM for the email.",'info',500000);
Related code:
const notify=useNotify();
notify("An email has been sent to you. Please check your SPAM for the email.",'info',500000);
The code box on the post page has a test notification button
Where have you seen that notify accept a duration as its third argument ? Documentation explain it accept an option object as the third argument, which are options sent to the translate function.
Marking this as a documentation issue to clarify the hook usage and an enhancement request to allow customizing the notification duration as this is not possible currently.
Note that the implementation of the enhancement is very easy: add the autoHideDuration param expected by the notificationActions action creator to the useNotify arguments. I'm marking it as a "good first issue".
What you were expecting:
The notification to stay as long as the number of seconds added in the third param
What happened instead:
The notification still uses the default timer and auto hides
Steps to reproduce:
I imported
import { useNotify,useSafeSetState} from "react-admin";
const notify=useNotify();
notify("An email has been sent to you. Please check your SPAM for the email.",'info',500000);
Related code:
const notify=useNotify();
notify("An email has been sent to you. Please check your SPAM for the email.",'info',500000);
The code box on the post page has a test notification button
https://codesandbox.io/s/great-hill-hm4zk
Environment
Dev
The text was updated successfully, but these errors were encountered: