T - the type of the SuggestBox valuepublic interface SuggestBoxStore<T>
SuggestBox with its
suggestion
The interface can be used to provide suggestions locally or remotely
LocalSuggestBoxStore| Modifier and Type | Interface and Description |
|---|---|
static interface |
SuggestBoxStore.MissingEntryProvider<T>
This method is used to implement the logic to handle the case when the user types in the
suggest something that does not match any of the available suggestions
|
static interface |
SuggestBoxStore.MissingSuggestProvider<T>
A function to provide a SuggestItem in case we try to set a value to the suggestBox that does
not match any of the possible suggestions
|
static interface |
SuggestBoxStore.SuggestionFilter<T> |
static interface |
SuggestBoxStore.SuggestionsHandler<T>
A function to provide a List of
SuggestItem to the filter(String, SuggestionsHandler) |
| Modifier and Type | Method and Description |
|---|---|
void |
filter(String value,
SuggestBoxStore.SuggestionsHandler<T> suggestionsHandler)
Takes the current typed text in the SuggestBox and provide a List of matching suggestion
|
default boolean |
filterItem(String searchValue,
SuggestItem<T> suggestItem)
Defines how to check a single SuggestItem against the search text, default to SuggestItem
lowercase display text contains the search text
|
void |
find(T searchValue,
Consumer<SuggestItem<T>> handler)
Takes a value of T and find the matching SuggestItem for this value, this is used when we
directly set the value to the SuggestBox to check if it is actually still matching an existing
suggestion
|
default SuggestBoxStore.MissingEntryProvider<T> |
getMessingEntryProvider() |
default SuggestBoxStore.MissingSuggestProvider<T> |
getMessingSuggestionProvider() |
void filter(String value, SuggestBoxStore.SuggestionsHandler<T> suggestionsHandler)
value - String text in the SuggestBoxsuggestionsHandler - SuggestBoxStore.SuggestionsHandlervoid find(T searchValue, Consumer<SuggestItem<T>> handler)
searchValue - Thandler - Consumer of SuggestItemdefault boolean filterItem(String searchValue, SuggestItem<T> suggestItem)
searchValue - StringsuggestItem - SuggestItemSuggestItem match the search textdefault SuggestBoxStore.MissingSuggestProvider<T> getMessingSuggestionProvider()
SuggestBoxStore.MissingSuggestProvider to handle missing suggestions for a value this is
default to Optional.empty()default SuggestBoxStore.MissingEntryProvider<T> getMessingEntryProvider()
SuggestBoxStore.MissingEntryProvider to handle missing suggestions for a text typed in the
SuggestBox this is default to Optional.empty()Copyright © 2019–2022 Dominokit. All rights reserved.