Closed pavangond closed 6 years ago
Sorry, I need reproduction repo for that because I think I don't understand the problem.
ok,
i have 3 click buttons, if i click on them, we will get error notifications
If i click on all buttons they will produce same error message (unique error message i.e Network error) .
all the 3 error messages are same, instead of displaying all the 3 messages i want to display only 1 messages(bcz all convey same information).
we want like this :-
Only if error messages are same then onclick of click1 or click2 or click3 we should show 1 message
If error messages are not same
How can i achieve it or Is there any features we have, to display single error message instead of displaying multiple similar error messages ?
Hi, thanks. So this logic shouldn't be in the scope of the library. You can use stack: false
option. It is documented. Or you can check if next error is the same as previous one and decide if you want to fire alert or not. Anyway I think that if you set the timeout for alerts it is even better UX when the same errors will appear one by one, because user will know what triggered the error in real time, but of course this is your decision.
We want to show max 5 messages so i can't make stack to false. We don't want to set the Timeout
Is there any feature that library provides us to avoid duplicate messages ?
In my react app, i have 4 react components in all of them i am refering react-s-alert . for some reason i am getting network issue while displaying those errors using react-s-alert all are displaying network failed error message(total 4 similar error messages).
I refered doc i didn't get any idea
Is it possible or not..?