reflex-dom-0.2: Functional Reactive Web Apps with Reflex

Safe HaskellNone
LanguageHaskell98

Reflex.Dom.Widget.Input

Synopsis

Documentation

checkbox :: MonadWidget t m => Bool -> CheckboxConfig t -> m (Checkbox t) Source

Create an editable checkbox Note: if the "type" or "checked" attributes are provided as attributes, they will be ignored

data Dropdown t k Source

Constructors

Dropdown 

Instances

HasValue (Dropdown t k) Source 
type Value (Dropdown t k) = Dynamic t k Source 

dropdown :: forall k t m. (MonadWidget t m, Ord k, Show k, Read k) => k -> Dynamic t (Map k String) -> DropdownConfig t k -> m (Dropdown t k) Source

Create a dropdown box The first argument gives the initial value of the dropdown; if it is not present in the map of options provided, it will be added with an empty string as its text

dropdown_value :: forall t k. Lens' (Dropdown t k) (Dynamic t k) Source

dropdown_change :: forall t k. Lens' (Dropdown t k) (Event t k) Source

class HasValue a where Source

Associated Types

type Value a :: * Source

Methods

value :: a -> Value a Source

def :: Default a => a

The default value for this type.

(&) :: a -> (a -> b) -> b infixl 1

& is a reverse application operator. This provides notational convenience. Its precedence is one higher than that of the forward application operator $, which allows & to be nested in $.

Since: 4.8.0.0

(.~) :: ASetter s t a b -> b -> s -> t infixr 4

Replace the target of a Lens or all of the targets of a Setter or Traversal with a constant value.

This is an infix version of set, provided for consistency with (.=).

f <$ a ≡ mapped .~ f $ a
>>> (a,b,c,d) & _4 .~ e
(a,b,c,e)
>>> (42,"world") & _1 .~ "hello"
("hello","world")
>>> (a,b) & both .~ c
(c,c)
(.~) :: Setter s t a b    -> b -> s -> t
(.~) :: Iso s t a b       -> b -> s -> t
(.~) :: Lens s t a b      -> b -> s -> t
(.~) :: Traversal s t a b -> b -> s -> t