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 |
Dropdown widget, allowing selection of a single item from a collapsable list.
Both header and list content is text based. In case a customizable version is
is needed, Dropdown
can be used.
Configs:
- onFocus: event to raise when focus is received.
- onFocusReq: WidgetReqest to generate when focus is received.
- onBlur: event to raise when focus is lost.
- onBlurReq: WidgetReqest to generate when focus is lost.
- onChange: event to raise when selected item changes.
- onChangeReq: WidgetRequest to generate when selected item changes.
- onChangeIdx: event to raise when selected item changes. Includes index,
- onChangeIdxReq: WidgetRequest to generate when selected item changes. Includes index.
- maxHeight: maximum height of the list when dropdown is expanded.
- itemBasicStyle: style of an item in the list when not selected.
- itemSelectedStyle: style of the selected item in the list.
Synopsis
- textDropdown :: (WidgetModel s, WidgetEvent e, Traversable t, TextDropdownItem a, TextShow a) => ALens' s a -> t a -> WidgetNode s e
- textDropdown_ :: (WidgetModel s, WidgetEvent e, Traversable t, TextDropdownItem a) => ALens' s a -> t a -> (a -> Text) -> [DropdownCfg s e a] -> WidgetNode s e
- textDropdownV :: (WidgetModel s, WidgetEvent e, Traversable t, TextDropdownItem a, TextShow a) => a -> (a -> e) -> t a -> WidgetNode s e
- textDropdownV_ :: (WidgetModel s, WidgetEvent e, Traversable t, TextDropdownItem a) => a -> (a -> e) -> t a -> (a -> Text) -> [DropdownCfg s e a] -> WidgetNode s e
- textDropdownS :: (WidgetModel s, WidgetEvent e, Traversable t, TextDropdownItem a, Show a) => ALens' s a -> t a -> WidgetNode s e
- textDropdownS_ :: (WidgetModel s, WidgetEvent e, Traversable t, TextDropdownItem a, Show a) => ALens' s a -> t a -> [DropdownCfg s e a] -> WidgetNode s e
- textDropdownSV :: (WidgetModel s, WidgetEvent e, Traversable t, TextDropdownItem a, Show a) => a -> (a -> e) -> t a -> WidgetNode s e
- textDropdownSV_ :: (WidgetModel s, WidgetEvent e, Traversable t, TextDropdownItem a, Show a) => a -> (a -> e) -> t a -> [DropdownCfg s e a] -> WidgetNode s e
Documentation
textDropdown :: (WidgetModel s, WidgetEvent e, Traversable t, TextDropdownItem a, TextShow a) => ALens' s a -> t a -> WidgetNode s e Source #
Creates a text dropdown using the given lens. The type must be have a TextShow
instance.
textDropdown_ :: (WidgetModel s, WidgetEvent e, Traversable t, TextDropdownItem a) => ALens' s a -> t a -> (a -> Text) -> [DropdownCfg s e a] -> WidgetNode s e Source #
Creates a text dropdown using the given lens. Takes a function for converting the type to Text. Accepts config.
textDropdownV :: (WidgetModel s, WidgetEvent e, Traversable t, TextDropdownItem a, TextShow a) => a -> (a -> e) -> t a -> WidgetNode s e Source #
Creates a text dropdown using the given value and onChange event handler. Takes a function for converting the type to Text.
textDropdownV_ :: (WidgetModel s, WidgetEvent e, Traversable t, TextDropdownItem a) => a -> (a -> e) -> t a -> (a -> Text) -> [DropdownCfg s e a] -> WidgetNode s e Source #
Creates a text dropdown using the given value and onChange event handler. Takes a function for converting the type to Text. Accepts config.
textDropdownS :: (WidgetModel s, WidgetEvent e, Traversable t, TextDropdownItem a, Show a) => ALens' s a -> t a -> WidgetNode s e Source #
Creates a text dropdown using the given lens. The type must be have a Show
instance.
textDropdownS_ :: (WidgetModel s, WidgetEvent e, Traversable t, TextDropdownItem a, Show a) => ALens' s a -> t a -> [DropdownCfg s e a] -> WidgetNode s e Source #
Creates a text dropdown using the given lens. The type must be have a Show
instance. Accepts config.
textDropdownSV :: (WidgetModel s, WidgetEvent e, Traversable t, TextDropdownItem a, Show a) => a -> (a -> e) -> t a -> WidgetNode s e Source #
Creates a text dropdown using the given value and onChange event handler. The
type must be have a Show
instance.
textDropdownSV_ :: (WidgetModel s, WidgetEvent e, Traversable t, TextDropdownItem a, Show a) => a -> (a -> e) -> t a -> [DropdownCfg s e a] -> WidgetNode s e Source #
Creates a text dropdown using the given value and onChange event handler. The
type must be have a Show
instance. Accepts config.