diff options
author | Yorhel <git@yorhel.nl> | 2019-10-30 12:39:07 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2019-11-10 12:44:55 +0100 |
commit | 683c2298dcdbda96d44e23d5f4db3f3c959d1161 (patch) | |
tree | ae3064f7723e21c1e5f153a56d10b02cdcbffcfa /elm/Lib | |
parent | dc243fb2d89c69611e3c2a154749c14643a69db0 (diff) |
ulist: Inline assigning labels to VNs
I'm really unhappy with the workarounds to deal with the global onClick
subscription doing the right thing, but I wasn't able to find a good
alternative.
Diffstat (limited to 'elm/Lib')
-rw-r--r-- | elm/Lib/Html.elm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/elm/Lib/Html.elm b/elm/Lib/Html.elm index d9c0594a..770e9142 100644 --- a/elm/Lib/Html.elm +++ b/elm/Lib/Html.elm @@ -12,6 +12,10 @@ import Lib.Api as Api onClickN : m -> Attribute m onClickN action = custom "click" (JD.succeed { message = action, stopPropagation = True, preventDefault = True}) +-- onClick with preventDefault +onClickD : m -> Attribute m +onClickD action = custom "click" (JD.succeed { message = action, stopPropagation = False, preventDefault = True}) + -- onInput that also tells us whether the input is valid onInputValidation : (String -> Bool -> msg) -> Attribute msg onInputValidation msg = custom "input" <| |