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

Use custom transport #232

Closed
conradz opened this issue May 10, 2013 · 2 comments
Closed

Use custom transport #232

conradz opened this issue May 10, 2013 · 2 comments

Comments

@conradz
Copy link

conradz commented May 10, 2013

Is there any way to use a custom transport for the queries? I need to use a custom function to get the requests (using AJAX, WebSockets, in-memory, or any other method).

Ideally I would be able to specify a function to the remote option, like in the following:

$(el).typeahead({
  name: 'custom',
  remote: function(query, done) { done([query, 'test', 'test2']); }
});

Another way would be to allow specifying a transport object for the queries. Currently it creates a new Transport object if remote is specified, and does not allow specifying a custom transport (at least not that I saw).

@brianmhunt
Copy link

Hi @conradz - you may want to have a look at my pull request #220 - is that what you're looking for?

@conradz
Copy link
Author

conradz commented May 10, 2013

Oh yes, that is exactly what I'm looking for. For some reason I couldn't find any previous issues. Also covered in the issues #95 and #206.

Closing in favor of the existing open issues.

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

No branches or pull requests

2 participants