Hello, I've created a simple extension to the Typeahead plugin that I 
thought I would share for anyone looking for some additional functionality.

Full documentation and demo - 
https://github.com/tcrosen/twitter-bootstrap-typeahead
Changes from the Original:

*All original methods are now overridable*


   - matcher
   - sorter
   - highlighter
   - select
   - render
   
*New options have been added:*

*valueProp*
Default: *id*
Description: The object value that is returned when an item is selected.

*matchProp*
Default: *name*
Description: The object property to match the query against.

*sortProp*
Default: *name*
Description: The object property to use when sorting the items.

*itemSelected*
Default: *function (item, val, text) {}*
Description: The callback function that is invoked when an item is chosen.


   - item: the HTML element that was selected
   - val: value of the *valueProp* property
   - text: value of the *textProp* property
   

Enjoy!


Reply via email to