Module

Autocomplete.Store

Package
purescript-autocomplete
Repository
spicydonuts/purescript-autocomplete

#SuggesterState Source

newtype SuggesterState a

Stores searched terms so they can be recalled without re-querying. Also stores the current search terms.

Constructors

#updateSuggestions Source

updateSuggestions :: forall a. SuggesterAction a -> SuggesterState a -> SuggesterState a

Updates the suggestion store, updating either the current terms or search results.

#hasSuggestionResults Source

hasSuggestionResults :: forall a. SuggesterState a -> Boolean

Returns whether the store contains any form of results for the current terms.

#getSuggestionResults Source

getSuggestionResults :: forall a. SuggesterState a -> Suggestions a

Find the results for the store's current terms, or an empty result set.