Love this post, it has saved me a couple of times, thank you very much for putting it together!! 🙌
Just wanted to point that there is a slight mistake in the implementation of oustideTarget, you are not using the provided String param anywhere, and thus would have to duplicate the dropdown-id, a fix would be:
outsideTarget : String -> Decode.Decoder Msg
outsideTarget dropdownId =
Decode.field "target" (isOutsideDropdown dropdownId)
|> Decode.andThen
(\isOutside ->
if isOutside then
Decode.succeed Close
else
Decode.fail "inside dropdown"
)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Love this post, it has saved me a couple of times, thank you very much for putting it together!! 🙌
Just wanted to point that there is a slight mistake in the implementation of
oustideTarget, you are not using the provided String param anywhere, and thus would have to duplicate thedropdown-id, a fix would be: