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 aConstructors
Search String aHighlight Target aSelect Int aCaptureFocus FocusEvent aKey KeyboardEvent aItemClick Int MouseEvent aPreventClick MouseEvent aSetVisibility Visibility aToggleVisibility aReplaceItems (Array item) aRaise (o Unit) aReceive (Input o item eff) a
#InputType Source
data InputTypeText-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 }