twitter/typeahead.js — pull request #523 by jdaily (2013-11-18 01:59:05+00:00)
Title: Return custom display key instead of default value on Input selection.

This provides the ability to set the Input value upon selection to a custom key from datum object.

Created a config option 'displayKey' for typeahead to specify a key/value of datum object other than the default value' to return upon selection.

I use this to search on a dataset by the valueKey, but return a different value from the dataset to the Input. If multiple datasets are used, then all must have the displayKey present to return. Currently the config option is set at the typeahead level and not per dataset.