| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Web.Hyperbole.HyperView.Event
Synopsis
- type DelayMs = Int
- event :: (ViewAction (Action id), Attributable a) => Name -> Action id -> Attributes a -> Attributes a
- eventName :: Text -> Name
- onLoad :: (ViewAction (Action id), Attributable a) => Action id -> DelayMs -> Attributes a -> Attributes a
- onClick :: (ViewAction (Action id), Attributable a) => Action id -> Attributes a -> Attributes a
- onDblClick :: (ViewAction (Action id), Attributable a) => Action id -> Attributes a -> Attributes a
- onMouseEnter :: (ViewAction (Action id), Attributable a) => Action id -> Attributes a -> Attributes a
- onMouseLeave :: (ViewAction (Action id), Attributable a) => Action id -> Attributes a -> Attributes a
- onInput :: (ViewAction (Action id), Attributable a) => Action id -> DelayMs -> Attributes a -> Attributes a
- onChange :: (ViewAction (Action id), Attributable a) => Action id -> Attributes a -> Attributes a
- onSubmit :: (ViewAction (Action id), Attributable a) => Action id -> Attributes a -> Attributes a
- onKeyDown :: (ViewAction (Action id), Attributable a) => Key -> Action id -> Attributes a -> Attributes a
- onKeyUp :: (ViewAction (Action id), Attributable a) => Key -> Action id -> Attributes a -> Attributes a
- keyDataAttribute :: Key -> Text
- data Key
- dataTarget :: (ViewId id, Attributable a) => id -> Attributes a -> Attributes a
- target :: (HyperViewHandled id ctx, ViewId id) => id -> ViewState id -> View id () -> View ctx ()
Documentation
event :: (ViewAction (Action id), Attributable a) => Name -> Action id -> Attributes a -> Attributes a Source #
onLoad :: (ViewAction (Action id), Attributable a) => Action id -> DelayMs -> Attributes a -> Attributes a Source #
onClick :: (ViewAction (Action id), Attributable a) => Action id -> Attributes a -> Attributes a Source #
onDblClick :: (ViewAction (Action id), Attributable a) => Action id -> Attributes a -> Attributes a Source #
onMouseEnter :: (ViewAction (Action id), Attributable a) => Action id -> Attributes a -> Attributes a Source #
onMouseLeave :: (ViewAction (Action id), Attributable a) => Action id -> Attributes a -> Attributes a Source #
onInput :: (ViewAction (Action id), Attributable a) => Action id -> DelayMs -> Attributes a -> Attributes a Source #
Run an action when the user types into an input or textarea.
WARNING: a short delay can result in poor performance. It is not recommended to set the value of the input
input @ (onInput Search 250)
onChange :: (ViewAction (Action id), Attributable a) => Action id -> Attributes a -> Attributes a Source #
onSubmit :: (ViewAction (Action id), Attributable a) => Action id -> Attributes a -> Attributes a Source #
onKeyDown :: (ViewAction (Action id), Attributable a) => Key -> Action id -> Attributes a -> Attributes a Source #
onKeyUp :: (ViewAction (Action id), Attributable a) => Key -> Action id -> Attributes a -> Attributes a Source #
keyDataAttribute :: Key -> Text Source #
Constructors
| ArrowDown | |
| ArrowUp | |
| ArrowLeft | |
| ArrowRight | |
| Enter | |
| Space | |
| Escape | |
| Alt | |
| CapsLock | |
| Control | |
| Fn | |
| Meta | |
| Shift | |
| OtherKey Text |
dataTarget :: (ViewId id, Attributable a) => id -> Attributes a -> Attributes a Source #
Internal