From d6fb5790465a86d18267e2babfb83555483cbc5d Mon Sep 17 00:00:00 2001 From: Evander Tino Date: Thu, 31 Dec 2015 11:45:41 +0300 Subject: [PATCH] Update typeahead.d.ts For some reasons when using typeahead dataset display field with angular, the bindings dont work properly across every field mapped. But displayKey works. According to the api https://github.com/twitter/typeahead.js/blob/master/src/typeahead/dataset.js#L47 both fields are accepted. --- typeahead/typeahead.d.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/typeahead/typeahead.d.ts b/typeahead/typeahead.d.ts index e01e0d509..8164d430e 100644 --- a/typeahead/typeahead.d.ts +++ b/typeahead/typeahead.d.ts @@ -181,7 +181,13 @@ declare module Twitter.Typeahead { * Defaults to value. */ display?: string | ((obj: any) => string); - + + /** + * Can be used in place of display above. + * + */ + displayKey?: string | ((obj: any) => string); + /** * A hash of templates to be used when rendering the dataset. * Note a precompiled template is a function that takes a JavaScript object as its first argument and returns a HTML string.