Snackbar Payload not working
Closed this issue · 1 comments
The Snackbar payload
feature/field does not seem to be working properly for me; I provide it with a message I'd like to be triggered when the button on the snackbar is clicked, but it doesn't seem to cause the relevant branch of the update
function to fire.
I'm trying to implement an "undo" function in my app, but I've put together a more simplified example in Ellie demoing the problem: https://ellie-app.com/3q2s4hvhRMba1/4
Given that the Snackbar interface is a little bit complicated, it's also entirely possible I'm missing something 😅
Turns out it was my mistake. I wasn't handling Snackbar.Click
messages in my update function.
(for anyone running across this in the future, see https://github.com/debois/elm-mdl/blob/master/demo/Demo/Snackbar.elm#L123-L126)