Module

React.Basic.ReactSelect

Package
purescript-react-select-basic
Repository
lumihq/purescript-react-select-basic

#SelectOption Source

type SelectOption additionalData = { label :: String, value :: String | additionalData }

#SelectProps Source

type SelectProps additionalData props = (className :: String, filterOptions :: Array (SelectOption additionalData) -> Array (SelectOption additionalData), id :: String, name :: String, noResultsText :: String, optionRenderer :: SelectOption additionalData -> JSX, placeholder :: String, searchable :: Boolean, style :: CSS | props)

#SingleChangeCallback Source

type SingleChangeCallback additionalData = EffectFn1 (Nullable (SelectOption additionalData)) Unit

#MultiChangeCallback Source

type MultiChangeCallback additionalData = EffectFn1 (Nullable (Array (SelectOption additionalData))) Unit

#singleSelect Source

singleSelect :: forall additionalData rest_ rest. Union rest rest_ (SelectProps additionalData (onChange :: SingleChangeCallback additionalData)) => Component { options :: Array (SelectOption additionalData), value :: String | rest }

Basic single-select picker

#multiSelect Source

multiSelect :: forall additionalData rest_ rest. Union rest rest_ (SelectProps additionalData (onChange :: MultiChangeCallback additionalData)) => Component { options :: Array (SelectOption additionalData), value :: Array String | rest }

Basic multi-select picker

#asyncSingleSelect Source

asyncSingleSelect :: forall additionalData rest_ rest. Union rest rest_ (SelectProps additionalData (onChange :: SingleChangeCallback additionalData)) => Component { loadOptions :: String -> Promise { options :: Array (SelectOption additionalData) }, value :: String | rest }

Single-select picker which loads options asynchronously

#asyncMultiSelect Source

asyncMultiSelect :: forall additionalData rest_ rest. Union rest rest_ (SelectProps additionalData (onChange :: MultiChangeCallback additionalData)) => Component { loadOptions :: String -> Promise { options :: Array (SelectOption additionalData) }, value :: Array String | rest }

Multi-select picker which loads options asynchronously