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

Safe HaskellNone
LanguageHaskell98

Reflex.Dom.Widget.Input

Synopsis

Documentation

textInput :: MonadWidget t m => TextInputConfig t -> m (TextInput t) Source

Create an input whose value is a string. By default, the "type" attribute is set to "text", but it can be changed using the _textInputConfig_inputType field. Note that only types for which the value is always a string will work - types whose value may be null will not work properly with this widget.

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