// Type definitions for Selectize 0.11.2 // Project: https://github.com/brianreavis/selectize.js // Definitions by: Adi Dahiya // Definitions: https://github.com/borisyankov/DefinitelyTyped /// declare module Selectize { // see https://github.com/brianreavis/selectize.js/blob/master/docs/usage.md // option identifiers are parameterized by T; data is parameterized by U interface IOptions { // General // ------------------------------------------------------------------------------------------------------------ /** * The string to separate items by. This option is only used when Selectize is instantiated from a * element. * * Default: ',' */ delimiter?: string; /** * Enable or disable international character support. * * Default: true */ diacritics?: boolean; /** * Allows the user to create a new items that aren't in the list of options. * This option can be any of the following: "true", "false" (disabled), or a function that accepts two * arguments: "input" and "callback". The callback should be invoked with the final data for the option. * * Default: false */ create?: any; /** * If true, when user exits the field (clicks outside of input or presses ESC) new option is created and * selected (if `create`-option is enabled). * * Default: false */ createOnBlur?: boolean; /** * Specifies a RegExp or String containing a regular expression that the current search filter must match to * be allowed to be created. May also be a predicate function that takes the filter text and returns whether * it is allowed. * * Default: null */ createFilter?: any; /** * Toggles match highlighting within the dropdown menu. * * Default: true */ highlight?: boolean; /** * If false, items created by the user will not show up as available options once they are unselected. * * Default: true */ persist?: boolean; /** * Show the dropdown immediately when the control receives focus. * * Default: true */ openOnFocus?: boolean; /** * The max number of items to render at once in the dropdown list of options. * * Default: 1000 */ maxOptions?: number; /** * The max number of items the user can select. * * Default: Infinity */ maxItems?: number; /** * If true, the items that are currently selected will not be shown in the dropdown list of available options. * * Default: false */ hideSelected?: boolean; /** * If true, Selectize will treat any options with a "" value like normal. This defaults to false to * accomodate the common with