Module

Select

Package
purescript-halogen-select
Repository
citizennet/purescript-halogen-select

#Component Source

type Component o item eff m = Component HTML (Query o item eff) (Input o item eff) (Message o item) m

#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)

#Effects Source

type Effects eff = (avar :: AVAR, dom :: DOM | eff)

#Target Source

data Target

Constructors

Instances

#MouseState Source

data MouseState

Constructors

Instances

#Visibility Source

data Visibility

Constructors

Instances

#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, mouseDown :: Boolean, search :: String, visibility :: Visibility }

#Debouncer Source

type Debouncer eff = { fiber :: Fiber eff Unit, var :: AVar Unit }

#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 }

#component Source

component :: forall m eff item o. MonadAff (Effects eff) m => Component o item (Effects eff) m