Copyright | (c) 2018 Francisco Vallarino |
---|---|
License | BSD-3-Clause (see the LICENSE file) |
Maintainer | fjvallarino@gmail.com |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
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:
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 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
textArea :: WidgetEvent e => ALens' s Text -> WidgetNode s e Source #
Creates a text area using the given lens.
textArea_ :: WidgetEvent e => ALens' s Text -> [TextAreaCfg s e] -> WidgetNode s e Source #
Creates a text area using the given lens. Accepts config.
textAreaV :: WidgetEvent e => Text -> (Text -> e) -> WidgetNode s e Source #
Creates a text area using the given value and onChange
event handler.
textAreaV_ :: WidgetEvent e => Text -> (Text -> e) -> [TextAreaCfg s e] -> WidgetNode s e Source #
Creates a text area using the given value and onChange
event handler.
Accepts config.
textAreaD_ :: WidgetEvent e => WidgetData s Text -> [TextAreaCfg s e] -> WidgetNode s e Source #
Creates a text area providing a WidgetData
instance and config.