tcrosen/twitter-bootstrap-typeahead — pull request #3 by binaryjunkie (2012-05-26 03:00:20+00:00)
Title: Support for ERB style templates; return source data item in callback.

Adds support for specifying a template for the list item HTML. This allows for including properties other than the match property and greater customization of the list entry. The library looks for underscore.js and leverages it's template processor; if it doesn't exist, it uses John Resig's micro-template function (added to the typeahead class for convenience). Cool cool cool.

The actual array item is now passed back in the itemSelected function in addition to the element, value, and text, preventing the need to look up the object by id.