Closed denis-anisimov closed 8 years ago
Hi Denis,
you are missing this setting:
field.setMinChars(1);
By default, the threshold for auto completion is three letters.
Hi Max. OK, you are right, my bad. But it's not obvious. At least online demo works with one char but example source code on add-on page doesn't contain any mention about this. Would be good to add it to clarify this issue.
Thank you for your suggestion. I have added the available configuration options to the example code in the Directory:
// ===============================
// Available configuration options
// ===============================
field.setCache(true) // Client side should cache suggestions
field.setDelay(150) // Delay before sending a query to the server
field.setItemAsHtml(false) // Suggestions contain html formating. If true, make sure that the html is save to use!
field.setMinChars(3) // The required value length to trigger a query
field.setScrollBehavior(ScrollBehavior.NONE) // The method that should be used to compensate scrolling of the page
field.setSuggestionLimit(0) // The max amount of suggestions send to the client. If the limit is >= 0 no limit is applied
Very good. Thanks!
Use attached project. Type "a" in the textfield. Nothing happens. Suggestions don't appear. test.zip