twitter/typeahead.js — pull request #882 by Leonidaz (2014-07-04 18:40:53+00:00)
Title: allow to specify the template for the suggestion wrapper via "suggestionWrapper" template

allows to supply a different suggestion wrapper template to allow finer control of the dropdown suggestions.

This is useful to display suggestions that need to appear disabled and should not be selectable or participate in the auto-complete.

Example of the "suggestionWrapper" template to change suggestion wrapper class to "tt-suggestion-disabled" if the suggestion data contains some flag:

and the css for for "tt-suggestion-disabled":

.tt-suggestion-disabled {
padding: 8px 20px;
font-size: 18px;
line-height: 24px;
}

.tt-suggestion-disabled, .tt-suggestion-disabled.tt-cursor {
color: #D1D0CE;
cursor: pointer;
}

.tt-suggestion-disabled p {
margin: 0;
}