From c07a61d1aa2f0cc628df15f09853dfe1872868c4 Mon Sep 17 00:00:00 2001 From: Sengouttouvane Shanmugam Date: Wed, 13 Dec 2017 11:27:28 -0600 Subject: [PATCH] Add classes option to jqueryui autocomplete See http://api.jqueryui.com/autocomplete/#option-classes Signed-off-by: Grant Hutchins --- types/jqueryui/index.d.ts | 14 ++++++++++---- types/jqueryui/jqueryui-tests.ts | 7 ++++++- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/types/jqueryui/index.d.ts b/types/jqueryui/index.d.ts index f32c55eb48..a11be350c4 100644 --- a/types/jqueryui/index.d.ts +++ b/types/jqueryui/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for jQueryUI 1.11 +// Type definitions for jQueryUI 1.12 // Project: http://jqueryui.com/ // Definitions by: Boris Yankov , John Reilly // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -51,6 +51,12 @@ declare namespace JQueryUI { minLength?: number; position?: any; // object source?: any; // [], string or () + classes?: AutocompleteClasses; + } + + interface AutocompleteClasses { + "ui-autocomplete"?: string; + "ui-autocomplete-input"?: string; } interface AutocompleteUIParams { @@ -377,7 +383,7 @@ declare namespace JQueryUI { open?: DialogEvent; close?: DialogEvent; } - + interface DialogClasses { "ui-dialog"?: string; "ui-dialog-content"?: string; @@ -1384,8 +1390,8 @@ interface JQuery { * @param optionName 'autohide' */ datepicker(methodName: 'option', optionName: 'autohide'): boolean; - - + + /** * Get the endDate after initialization * diff --git a/types/jqueryui/jqueryui-tests.ts b/types/jqueryui/jqueryui-tests.ts index c2067574cd..a9f6f0b5ff 100644 --- a/types/jqueryui/jqueryui-tests.ts +++ b/types/jqueryui/jqueryui-tests.ts @@ -911,7 +911,12 @@ function test_autocomplete() { "Nothing selected, input was " + this.value); } }); - + $("#birds").autocomplete({ + classes: { + 'ui-autocomplete': 'foo', + 'ui-autocomplete-input': 'bar' + } + }) }