-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom lookup function cannot produce string[] of suggestions #837
Comments
There is a sample in a readme that shows this. Because final format is always You can always open a PR with an updated documentation. |
Thank you for your quick reply. I think the issue, then, is that Response Format in the documentation mentions that:
... which is misleading, because it's not true for the return type of |
No it is not intentional, this issue never came up. Just how it was done initially. |
Ok, thanks for clarifying. Looking at the code, the |
jquery-autocomplete v1.4.11
The documentation implies that lookup suggestions can be provided as a
string[]
or an array of{ value: string, data: any }
objects. When using aserviceUrl
,transformResult
can produce a response like:However, when using a
lookup
function, the response (given to thedone
function) cannot be formatted like that. It must be formatted as:The
data
properties are optional, but you cannot just use astring[]
for the suggestions.For instance:
Please clarify the documentation or (better) allow the lookup function to produce the simpler
{ suggestions: string[] }
format. Thanks!The text was updated successfully, but these errors were encountered: