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

'source' for Dataset #206

Closed
gemshare-jonathan opened this issue Apr 18, 2013 · 6 comments
Closed

'source' for Dataset #206

gemshare-jonathan opened this issue Apr 18, 2013 · 6 comments
Assignees
Milestone

Comments

@gemshare-jonathan
Copy link

From discussion on #95

The use case is to get data from a function, which wraps calls to 3rd party APIs that do not expose an URL, such as Google Places.

@timtrueman
Copy link
Contributor

You can do some advanced configuration that will allow you to do things like preprocess the URL to send to, or post-process data, etc.—the docs for that are here: https://github.com/twitter/typeahead.js#remote

@brianmhunt
Copy link

@gemshare-jonathan - would this issue be resolved with pull request #220 (or some equivalent?)

@gemshare-jonathan
Copy link
Author

@brianmhunt thanks - #220 looks like what we need. I read your comments and I am not sure when/why we need both computed and remote on the same dataset. It seems computed should be a variant of remote. things like rate limiting is still useful for computed.

any luck on getting #220 reviewed and merged?

@brianmhunt
Copy link

Thanks for the comments. Under issue #95 there is some discussion of the rationale for adding compute versus reusing remote, it being an issue both semantic (computed fields need not involve remote data so "remote" is inaccurate and misleading), and practical/stylistic (I.e. to have typeahead check argument types or not).

Since local and remote could similarly be distinguished on type (string versus array), it seems using the distinct name computed fits better with the existing style. They could all just be one 'source' field and typeahead could distinguish them on type.

One can always do rate limiting oneself with computed, of course. The implementation of computed does reuse some of the remote code - namely for insertion and duplicate checking, but not rate limiting. Debounce and throttle implementations are trite now, though.

@jharding
Copy link
Contributor

any luck on getting #220 reviewed and merged?

I've had a lack of free time over the past month and I haven't been able to deal with typeahead.js issues as thoroughly as I'd like. Things should start to settle down for me within the next week or two and that's when I'll be able to take a look at issues/PRs in a bit more detail.

@jharding
Copy link
Contributor

jharding commented Feb 2, 2014

You can now define a custom source for your data in v0.10, so I'm going to go ahead and close this issue.

@jharding jharding closed this as completed Feb 2, 2014
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

4 participants