Copyright | (c) 2018 Francisco Vallarino |
---|---|
License | BSD-3-Clause (see the LICENSE file) |
Maintainer | fjvallarino@gmail.com |
Stability | experimental |
Portability | non-portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Input field for multiline Text
. Allows setting the maximum number of
characters, lines and whether the tab key should trigger focus change.
textArea longTextLens
With configuration options:
textArea_ longTextLens [maxLength 1000, selectOnFocus]
Synopsis
- data TextAreaCfg s e
- textArea :: WidgetEvent e => ALens' s Text -> WidgetNode s e
- textArea_ :: WidgetEvent e => ALens' s Text -> [TextAreaCfg s e] -> WidgetNode s e
- textAreaV :: WidgetEvent e => Text -> (Text -> e) -> WidgetNode s e
- textAreaV_ :: WidgetEvent e => Text -> (Text -> e) -> [TextAreaCfg s e] -> WidgetNode s e
- textAreaD_ :: WidgetEvent e => WidgetData s Text -> [TextAreaCfg s e] -> WidgetNode s e
Configuration
data TextAreaCfg s e Source #
Configuration options for textArea:
caretWidth
: the width of the caret.caretMs
: the blink period of the caret.maxLength
: the maximum length of input text.maxLines
: the maximum number of lines of input text.acceptTab
: whether to handle tab and convert it to spaces (cancelling change of focus), or keep default behaviour and lose focus.selectOnFocus
: Whether all input should be selected when focus is received.readOnly
: Whether to prevent the user from changing the input text.onFocus
: event to raise when focus is received.onFocusReq
:WidgetRequest
to generate when focus is received.onBlur
: event to raise when focus is lost.onBlurReq
:WidgetRequest
to generate when focus is lost.onChange
: event to raise when the value changes.onChangeReq
:WidgetRequest
to generate when the value changes.
Instances
Constructors
:: WidgetEvent e | |
=> ALens' s Text | The lens into the model. |
-> WidgetNode s e | The created text area. |
Creates a text area using the given lens.
:: WidgetEvent e | |
=> ALens' s Text | The lens into the model. |
-> [TextAreaCfg s e] | The config options. |
-> WidgetNode s e | The created text area. |
Creates a text area using the given lens. Accepts config.
:: WidgetEvent e | |
=> Text | The current value. |
-> (Text -> e) | The event to raise on change. |
-> WidgetNode s e | The created text area. |
Creates a text area using the given value and onChange
event handler.
:: WidgetEvent e | |
=> Text | The current value. |
-> (Text -> e) | The event to raise on change. |
-> [TextAreaCfg s e] | The config options. |
-> WidgetNode s e | The created text area. |
Creates a text area using the given value and onChange
event handler.
Accepts config.
:: WidgetEvent e | |
=> WidgetData s Text | The |
-> [TextAreaCfg s e] | The config options. |
-> WidgetNode s e | The created text area. |
Creates a text area providing a WidgetData
instance and config.