My server callback already pre-filters the data and I want Tom Select to display all the results returned for the given query. I’ve tried to achieve this by setting searchField: []
. However, this also keeps results of previously typed queries.
Examples:
- bad: missing results:
- User searches for “Zurich” or “St Gallen”
- The server returns “Zürich” or “St. Gallen”, but Tom Select discards those results because they do not match the typed string.
- Conclusion: I want Tom Select to display all returned results.
- bad: old results:
- User searches for “Zurich”, then “St Gallen” (typing slowly and erasing the previous search with backspace)
- Results contain Zur, Zuric, Zurich, St, St Ga, St Gallen
- Conclusion: I want Tom Select to only display the results of the most recent query to the server
- good: what I’d need instead:
- User searches for “Zurich”, then “St Gallen” (typing slowly and erasing the previous search with backspace)
- As soon as the user has finished typing “Zurich”, the result “Zürich” is displayed.
- As the user erases “Zurich” and finishes typing “St Gallen”, the result “St. Gallen” is displayed.
Which combination of options allows me to cause this behavior?