Created
May 28, 2020 12:12
-
-
Save AlienKevin/9296ce7a420dc663513415d7c36be053 to your computer and use it in GitHub Desktop.
Detect onClick event without propagation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
onClickNoProp : Msg -> Html.Attribute Msg | |
onClickNoProp msg = | |
Html.Events.custom "click" | |
(Decode.succeed | |
{ message = msg | |
, stopPropagation = True | |
, preventDefault = False | |
} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment