Skip to content
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

Why does .typeahead('val') return an array? #659

Closed
Morgon opened this issue Feb 7, 2014 · 2 comments
Closed

Why does .typeahead('val') return an array? #659

Morgon opened this issue Feb 7, 2014 · 2 comments

Comments

@Morgon
Copy link
Contributor

Morgon commented Feb 7, 2014

When using Bloodhound remote as a POST request (#630), we use remote.ajax.beforeSend to set the POST parameter (#542).

I modified this to $().typeahead('val') per the docs, but that returns an array.
The docs do claim a string is returned. But I am curious if there was a reason for it to be an array either way.

Small issue, but did throw me for a few minutes until I really looked to see what was going on. :)
Thanks!

@jharding
Copy link
Contributor

jharding commented Feb 7, 2014

When using Bloodhound remote as a POST request (#630), we use remote.ajax.beforeSend to set the POST parameter (#542).

Thanks for letting me know these issues are affecting you. The fix for the former will be out within by early next week. The latter should be fixed in v0.10.2.

In regards to an array being returned by $#typeahead('val'), that's a good catch. Ideally, it should mirror $#val. This should be a simple change that I can probably get into v0.10.1.

@jharding jharding added this to the v0.10.1 milestone Feb 7, 2014
@Morgon
Copy link
Contributor Author

Morgon commented Feb 7, 2014

You are a beast (in a good way!) - thank you for the quick and thorough responses!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants