I'm playing with typeahead and I cannot get a simple proof of concept working.
In the code below I'm basically trying to build an autocomplete using 2 fields. The crazy thing is it that I can autocomplete for the year (value field) but not for the key field. Does anyone have any clue why?
$('#inputBox').typeahead([
{
name: 'best-picture-winners',
local: [{key: 'some key', value:2014}, {key: 'some key 2', value:2015}, {key: 'some key4', value:2016}],
template: '<p><strong>{{key}} {{value}}</strong></p>',
engine: Hogan,
valueKey: 'value'
}
]);