I have an application where I'm selecting some statuses. Initially, I had a code like this
div
[ classList
[ onClick (SelectStatus (Just status)) ]
But at some moment, I need to stop event propagation. I found that there is an onWithOptions function but I don't know how to use it. Especially what's the Decoder parameter for. I rewrite it to this form but I'm still getting some errors.
div
[ onWithOptions "click" { stopPropagation = True, preventDefault = False } keyCode (SelectStatus (Just status))
This is the error message
Function `onWithOptions` is expecting 3 arguments, but was given 4.
Maybe you forgot some parentheses? Or a comma?at line 171 col 11