Skip to content

Commit 20ea72a

Browse files
author
Tomas Kirda
authored
Merge pull request #501 from orchestra-ts/master
Fix the TypeScript description
2 parents aca7cb9 + 1481000 commit 20ea72a

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

typings/jquery-autocomplete/jquery.autocomplete-tests.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,7 @@ input.autocomplete({
134134
formatResult(suggestion: AutocompleteSuggestion, currentValue: string): string {
135135
return currentValue;
136136
},
137-
groupBy: [
138-
{ value: 'Chicago Blackhawks', data: { category: 'NHL' } },
139-
{ value: 'Chicago Bulls', data: { category: 'NBA' } }
140-
],
137+
groupBy: "category",
141138
maxHeight: 300,
142139
width: "auto",
143140
zIndex: 9999,

typings/jquery-autocomplete/jquery.autocomplete.d.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ interface JQueryAutocompleteOptions {
130130
* Callback function or lookup array for the suggestions. It may be array of strings or suggestion object literals.
131131
* -> suggestion: An object literal with the following format: { value: 'string', data: any }.
132132
*/
133-
lookup?: AutocompleteSuggestion[];
133+
lookup?: Function | AutocompleteSuggestion[];
134134

135135
/**
136136
* Filter function for local lookups. By default it does partial string match (case insensitive).
@@ -184,7 +184,8 @@ interface JQueryAutocompleteOptions {
184184
/**
185185
* Property name of the suggestion data object, by which results should be grouped.
186186
*/
187-
groupBy?: AutocompleteSuggestion | AutocompleteSuggestion[];
187+
groupBy?: string;
188+
188189
/**
189190
* Maximum height of the suggestions container in pixels.
190191
* @default 300
@@ -353,10 +354,6 @@ interface JQuery {
353354
*/
354355
autocomplete(methodName: "dispose"): AutocompleteInstance;
355356

356-
}
357-
358-
interface JQuery {
359-
360357
/**
361358
* Create Autocomplete component via plugin alias
362359
*/

0 commit comments

Comments
 (0)