mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 15:57:13 +00:00
Merge pull request #28876 from AlexStacker/patch-1
[@types/select2] Update missing methods parameter types
This commit is contained in:
Vendored
+16
@@ -112,6 +112,14 @@ interface Select2Plugin {
|
||||
* @params triggerChange Should a change event be triggered
|
||||
*/
|
||||
(method: 'data', value: any, triggerChange?: boolean): any;
|
||||
/**
|
||||
* Whether it is open
|
||||
*/
|
||||
(method: 'opened'): boolean;
|
||||
/**
|
||||
* Whether it is in focus
|
||||
*/
|
||||
(method: 'isFocused'): boolean;
|
||||
/**
|
||||
* Reverts changes to DOM done by Select2. Any selection done via Select2 will be preserved.
|
||||
*/
|
||||
@@ -124,11 +132,19 @@ interface Select2Plugin {
|
||||
* Closes the dropdown
|
||||
*/
|
||||
(method: 'close'): JQuery;
|
||||
/**
|
||||
* Disables Select2
|
||||
*/
|
||||
(method: 'disable'): JQuery;
|
||||
/**
|
||||
* Enables or disables Select2 and its underlying form component
|
||||
* @param value True if it should be enabled false if it should be disabled
|
||||
*/
|
||||
(method: 'enable', value?: boolean): JQuery;
|
||||
/**
|
||||
* Enable its focus
|
||||
*/
|
||||
(method: 'focus'): JQuery;
|
||||
/**
|
||||
* Toggles readonly mode on Select2 and its underlying form component
|
||||
* @param value True if it should be readonly false if it should be read write
|
||||
|
||||
@@ -220,6 +220,10 @@ $("#e8").select2("data");
|
||||
$("#e8").select2("data", { id: "CA", text: "Califoria" });
|
||||
$("#e8").select2("destroy");
|
||||
$("#e8").select2("open");
|
||||
$("#e8").select2("opened");
|
||||
$("#e8").select2("focus");
|
||||
$("#e8").select2("isFocused");
|
||||
$("#e8").select2("disable");
|
||||
$("#e8").select2("enable", false);
|
||||
$("#e8").select2("readonly", false);
|
||||
$("#e8").select2('container');
|
||||
|
||||
Reference in New Issue
Block a user