From 18d1673018b2468b64b8bd5e3ef0b34434d9f727 Mon Sep 17 00:00:00 2001 From: Anthony Chu Date: Tue, 6 Aug 2013 16:10:16 -0700 Subject: [PATCH] Fix bug in TypeaheadOptions; update TooltipOptions and PopoverOptions --- bootstrap/bootstrap-tests.ts | 7 ++++++- bootstrap/bootstrap.d.ts | 11 +++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/bootstrap/bootstrap-tests.ts b/bootstrap/bootstrap-tests.ts index 80e638b26..71698101f 100644 --- a/bootstrap/bootstrap-tests.ts +++ b/bootstrap/bootstrap-tests.ts @@ -35,6 +35,11 @@ $('#myCollapsible').collapse({ toggle: false }); $('.carousel').carousel(); $('.carousel').carousel({ interval: 2000 }); -$('.typeahead').typeahead(); +$('.typeahead').typeahead({ + matcher: item => true, + sorter: (items: any[]) => items, + updater: item => item, + highlighter: item => "" +}); $('#navbar').affix(); \ No newline at end of file diff --git a/bootstrap/bootstrap.d.ts b/bootstrap/bootstrap.d.ts index 47ef378fd..c14bf61d4 100644 --- a/bootstrap/bootstrap.d.ts +++ b/bootstrap/bootstrap.d.ts @@ -32,6 +32,7 @@ interface TooltipOptions { title?: any; trigger?: string; delay?: any; + container?: any; } interface PopoverOptions { @@ -42,7 +43,8 @@ interface PopoverOptions { trigger?: string; title?: any; content?: any; - delay?: any; + delay?: any; + container?: any; } interface CollapseOptions { @@ -59,9 +61,10 @@ interface TypeaheadOptions { source?: any; items?: number; minLength?: number; - matcher?: () => any; - sorter?: () => any; - highlighter?: () => any; + matcher?: (item: any) => boolean; + sorter?: (items: any[]) => any[]; + updater?: (item: any) => any; + highlighter?: (item: any) => string; } interface AffixOptions {