Merge pull request #5616 from aindlq/typeahed-display-key-fn

typeahead. Allow function as displayKey.
This commit is contained in:
Masahiro Wakame
2015-09-16 22:08:43 +09:00
+2 -2
View File
@@ -119,8 +119,8 @@ declare module Twitter.Typeahead {
* For a given suggestion object, determines the string representation of it.
* This will be used when setting the value of the input control after a suggestion is selected. Can be either a key string or a function that transforms a suggestion object into a string.
* Defaults to value.
*/
displayKey?: string;
*/
displayKey?: string | ((obj: any) => string);
/**
* A hash of templates to be used when rendering the dataset.