typeahead.js
typeahead.js copied to clipboard
Suggestion: Setting to change "value" key
Use case: I am using an existing API to fetch data for the typeahead. The data from the API does not contain a key called "value". It does however have another meaningful key called "name" I would like to use.
Suggestion: To have a property where we can set the value key, so we do not have to write wrappers for existing API's.
$(element).typeahead([{
name: 'source1',
remote: '/api/search?q=%QUERY',
valueKey: 'name'
}]);
:+1:
I can tackle this.
Yea, I guess it should allow to set a Datums (not only the value key) the same as a custom template can already be provided as a option...
Delaying this to v0.9.