mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
Merge pull request #21109 from topaxi/selectize
Add missing options to selectize config
This commit is contained in:
35
types/selectize/index.d.ts
vendored
35
types/selectize/index.d.ts
vendored
@@ -12,6 +12,11 @@ declare namespace Selectize {
|
||||
// General
|
||||
// ------------------------------------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* An array of the initial selected values. By default this is populated from the original input element.
|
||||
*/
|
||||
items?: T[];
|
||||
|
||||
/**
|
||||
* The string to separate items by. This option is only used when Selectize is instantiated from a
|
||||
* <input type="text"> element.
|
||||
@@ -95,6 +100,13 @@ declare namespace Selectize {
|
||||
*/
|
||||
hideSelected?: boolean;
|
||||
|
||||
/**
|
||||
* If true, the dropdown will be closed after a selection is made.
|
||||
*
|
||||
* Default: false
|
||||
*/
|
||||
closeAfterSelect?: boolean;
|
||||
|
||||
/**
|
||||
* If true, Selectize will treat any options with a "" value like normal. This defaults to false to
|
||||
* accomodate the common <select> practice of having the first empty option act as a placeholder.
|
||||
@@ -125,7 +137,7 @@ declare namespace Selectize {
|
||||
*
|
||||
* Default: false
|
||||
*/
|
||||
preload?: any;
|
||||
preload?: boolean | 'focus';
|
||||
|
||||
/**
|
||||
* The element the dropdown menu is appended to. This should be "body" or null.
|
||||
@@ -219,6 +231,13 @@ declare namespace Selectize {
|
||||
*/
|
||||
optgroupField?: string;
|
||||
|
||||
/**
|
||||
* The name of the property to disabled option and optgroup.
|
||||
*
|
||||
* Default: 'disabled'
|
||||
*/
|
||||
disabledField?: string;
|
||||
|
||||
/**
|
||||
* A single field or an array of fields to sort by. Each item in the array should be an object containing at
|
||||
* least a "field" property. Optionally, "direction" can be set to "asc" or "desc". The order of the array
|
||||
@@ -229,14 +248,14 @@ declare namespace Selectize {
|
||||
*
|
||||
* Default: "$order"
|
||||
*/
|
||||
sortField?: any;
|
||||
sortField?: string | { field: string, direction?: 'asc' | 'desc' }[];
|
||||
|
||||
/**
|
||||
* An array of property names to analyze when filtering options.
|
||||
*
|
||||
* Default: ["text"]
|
||||
*/
|
||||
searchField?: any;
|
||||
searchField?: string | string[];
|
||||
|
||||
/**
|
||||
* When searching for multiple terms (separated by a space), this is the operator used. Can be "and" or "or".
|
||||
@@ -288,6 +307,16 @@ declare namespace Selectize {
|
||||
*/
|
||||
onInitialize?(): any;
|
||||
|
||||
/**
|
||||
* Invoked when the control gains focus.
|
||||
*/
|
||||
onFocus?(): any;
|
||||
|
||||
/**
|
||||
* Invoked when the control loses focus.
|
||||
*/
|
||||
onBlur?(): any;
|
||||
|
||||
/**
|
||||
* Invoked when the value of the control changes.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user