Module
Autocomplete.Store
- Package
- purescript-autocomplete
- Repository
- jane/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
SuggesterState { currentResults :: Suggestions a, currentTerms :: Terms, store :: Map Terms (Suggestions a), termsHistory :: List Terms }
#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.