Add remote sources support for typeahead
Hi Mark,
the new typeahead component is awesome. But I often have to implement an autocomplete that is fetching data from a remote source. Would it be possible to add a callback, that I can use to query the remote server and return a set of items that match the entered query?
function(query) {
// Do some fetching and return an array of items.
}
The jQuery UI autocompleter offers returning an array of objects. This is very helpful, as you would often like to display a human friendly title to the user and set an ugly ID in the background as the field's value.
[{title: 'Look at me', value: '12345xyz'}, {title: 'Foo Bar', value: '654321abc'}]
I know, this increases the complexity of the typeahead component, but makes it on the other side very useful.
Thanks Marc
That's not something I'm likely going to get in for 2.0 - but maybe the next release
I think its very good ideas but given the pressure they are under currently to release 2.0 tomorrow and lots of other issues on current 2.0 I think its better to slate this for a later release.
yes it would be nice for a next version.
That said there is an open merge request of this at https://github.com/twitter/bootstrap/pull/1433 so I think there is a good chance getting it in sooner than later :)
+1
+1
:+1:
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1