Open alfonsogarciacaro opened 5 years ago
I tried that in the past couldn't find a clean way to support this. Because the dispatch. you have access to in the Cmd
is the one from the subcomponent.
That's what I would expect :)
The previous implementation is still in the code but not documented ^^.
If you want to try it:
I don't remember if this works or no. Or if there is more to add for making the view correct.
Because the toast is created as an Elmish command, it'd be useful to expose the dispatch function. For example, Elmish.Toastr allows you to send Elmish messages in the click event. Exposing
dispatch
would be more flexible if the user has a custom renderer and wants to display several buttons.