mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-30 23:30:06 +00:00
fix(@types/select2): Add missing $.fn.select2 typing
As per bottom of docs at http://select2.github.io/select2/
This commit is contained in:
8
types/select2/v3/index.d.ts
vendored
8
types/select2/v3/index.d.ts
vendored
@@ -168,6 +168,14 @@ interface Select2Plugin {
|
||||
(method: 'search'): JQuery;
|
||||
|
||||
(options: Select2Options): JQuery;
|
||||
|
||||
/**
|
||||
* Select2 exposes its default options via the $.fn.select2.defaults
|
||||
* object. Properties changed in this object (same properties configurable
|
||||
* through the constructor) will take effect for every instance created
|
||||
* after the change.
|
||||
*/
|
||||
defaults: Partial<Select2Options>;
|
||||
}
|
||||
|
||||
interface JQuery {
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
$.extend($.fn.select2.defaults, {
|
||||
width: 'copy',
|
||||
minimumInputLength: 12
|
||||
});
|
||||
|
||||
$("#e9").select2();
|
||||
$("#e2").select2({
|
||||
placeholder: "Select a State",
|
||||
|
||||
Reference in New Issue
Block a user