Module
Select
- Package
- purescript-halogen-select
- Repository
- citizennet/purescript-halogen-select
#ComponentHTML Source
type ComponentHTML o item eff = ComponentHTML (Query o item eff)
#ComponentDSL Source
type ComponentDSL o item eff m = ComponentDSL (StateStore o item eff) (Query o item eff) (Message o item) m
#StateStore Source
type StateStore o item eff = Store (State item eff) (ComponentHTML o item eff)
#Query Source
data Query o item eff a
Constructors
Search String a
Highlight Target a
Select Int a
CaptureFocus FocusEvent a
Key KeyboardEvent a
ItemClick Int MouseEvent a
PreventClick MouseEvent a
SetVisibility Visibility a
ToggleVisibility a
ReplaceItems (Array item) a
Raise (o Unit) a
Receive (Input o item eff) a
#InputType Source
data InputType
Text-driven inputs will operate like a normal search-driven selection component. Toggle-driven inputs will capture key streams and debounce in reverse (only notify about searches when time has expired). Perhaps could take a comparison function for automatic highlighting (optional).
Constructors
#State Source
type State item eff = { debounceTime :: Milliseconds, debouncer :: Maybe (Debouncer eff), highlightedIndex :: Maybe Int, inputElement :: Maybe HTMLElement, inputType :: InputType, items :: Array item, lastIndex :: Int, search :: String, visibility :: Visibility }
#Input Source
type Input o item eff = { debounceTime :: Maybe Milliseconds, initialSearch :: Maybe String, inputType :: InputType, items :: Array item, render :: State item eff -> ComponentHTML o item eff }