twitter/typeahead.js — pull request #478 by gjn (2013-10-09 12:12:24+00:00)
Title: Add dataset to 'suggestionsRendered' event

As the title indicates, this PR adds the actual dataset being rendered to the 'suggestionsRendered' event.

This allows the clients to do post-rendering manipulation of suggestions depending on dataset being rendered. As typeahead support x number of datasets and y datasets being rendered in response to a query (important: y might be smaller than x), it's important to know to what this event might refer to.

A sample of post-rendering manipulation is a $compile process of angularjs or any other data-binding library.

Sample code client code with a customized typeahead.js library including this change can be found here:
https://github.com/geoadmin/mf-geoadmin3/blob/master/src/components/search/SearchDirective.js#L304