| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Web.Hyperbole.HyperView.Input
Synopsis
- button :: ViewAction (Action id) => Action id -> View id () -> View id ()
- dropdown :: ViewAction (Action id) => (opt -> Action id) -> opt -> View (Option opt id) () -> View id ()
- option :: (ViewAction (Action id), Eq opt, ToParam opt) => opt -> Text -> View (Option opt id) ()
- selected :: Attributable h => Bool -> Attributes h -> Attributes h
- data Option opt (id :: k) = Option {
- defaultOption :: opt
- search :: ViewAction (Action id) => (Text -> Action id) -> DelayMs -> View id ()
- checked :: Attributable a => Bool -> Attributes a -> Attributes a
- route :: Route a => a -> View c () -> View c ()
Documentation
button :: ViewAction (Action id) => Action id -> View id () -> View id () Source #
<button> HTML tag which sends the action when pressed
#EMBED ExamplePageSimple.hs messageView
dropdown :: ViewAction (Action id) => (opt -> Action id) -> opt -> View (Option opt id) () -> View id () Source #
Type-safe dropdown. Sends (opt -> Action id) when selected. The default will be selected.
#EXAMPLE datafilter
#EMBED ExamplePageDataLists/Filter.hs familyDropdown
option :: (ViewAction (Action id), Eq opt, ToParam opt) => opt -> Text -> View (Option opt id) () Source #
An option for a dropdown or select
selected :: Attributable h => Bool -> Attributes h -> Attributes h Source #
sets selected = true if the dropdown predicate returns True
data Option opt (id :: k) Source #
The view context for an option
Constructors
| Option | |
Fields
| |
search :: ViewAction (Action id) => (Text -> Action id) -> DelayMs -> View id () Source #
A live search field. Set a DelayMs to avoid hitting the server on every keystroke
#EMBED ExamplePageErrors.hs viewSearchUsers
checked :: Attributable a => Bool -> Attributes a -> Attributes a Source #
Set checkbox = checked via the client (VDOM doesn't work)