The logic for filtering suggestions typically lives on the server rather than the client because it’s impractical to send all possible suggestions over the network. However, when prototyping in Playroom or working with smaller datasets, you may want to perform this filtering on the client instead.
For this case, we provide a filterSuggestions function to make this as painless as possible. This also handles highlights for you, using suggestionHighlight set to matching.
If filtering is being performed on the server, this can be safely omitted.
Most examples on this page use the filterSuggestions function to demonstrate real-world filtering behaviour.