Closed rdewolff closed 5 years ago
PS: yes, I know we can read the title and the message from the data
payload and could act accordingly, but in a i18n app, that's not elegant to do so.
@rdewolff So you want DropdownAlert to be the middle man in an data exchange so to speak, right?
Well when you throw many alerts, you want to have a parameter to be able to react to it. So adding a payload
would allow that.
Imagine you have 2 alerts at the same time, you want to react differently when the user push on each notification. With a parameter like this payload, this can be done.
This seems to me like a good idea and an elegant way to do it.
Hello!
Is there a way to pass some custom data to the payload returned by the
onClose
callback?Ideally, I wish to be able to do the following :
and in my
onClose
handler, I would have something like :What do you think? Is there a way to do this today? Would a PR in that direction make sense?
Cheers