@serenity-is/corelib / Select2Options
Interface: Select2Options
Table of contents
Properties
- adaptContainerCssClass
- adaptDropdownCssClass
- ajax
- allowClear
- blurOnChange
- closeOnSelect
- containerCss
- containerCssClass
- createSearchChoice
- createSearchChoicePosition
- data
- dropdownAutoWidth
- dropdownCss
- dropdownCssClass
- dropdownParent
- element
- escapeMarkup
- formatAjaxError
- formatInputTooLong
- formatInputTooShort
- formatLoadMore
- formatMatches
- formatNoMatches
- formatResult
- formatResultCssClass
- formatSearching
- formatSelection
- formatSelectionCssClass
- formatSelectionTooBig
- id
- initSelection
- loadMorePadding
- matcher
- maximumInputLength
- maximumSelectionSize
- minimumInputLength
- minimumResultsForSearch
- multiple
- nextSearchTerm
- openOnEnter
- placeholder
- placeholderOption
- populateResults
- query
- searchInputPlaceholder
- selectOnBlur
- separator
- shouldFocusInput
- sortResults
- tags
- tokenSeparators
- tokenizer
- width
Properties
adaptContainerCssClass
• Optional
adaptContainerCssClass: (p1
: string
) => string
Type declaration
▸ (p1
): string
Parameters
Name | Type |
---|---|
p1 |
string |
Returns
string
Defined in
adaptDropdownCssClass
• Optional
adaptDropdownCssClass: (p1
: string
) => string
Type declaration
▸ (p1
): string
Parameters
Name | Type |
---|---|
p1 |
string |
Returns
string
Defined in
ajax
• Optional
ajax: Select2AjaxOptions
Defined in
allowClear
• Optional
allowClear: boolean
Defined in
blurOnChange
• Optional
blurOnChange: boolean
Defined in
closeOnSelect
• Optional
closeOnSelect: boolean
Defined in
containerCss
• Optional
containerCss: any
Defined in
containerCssClass
• Optional
containerCssClass: any
Defined in
createSearchChoice
• Optional
createSearchChoice: (p1
: string
) => Select2Item
Type declaration
▸ (p1
): Select2Item
Parameters
Name | Type |
---|---|
p1 |
string |
Returns
Defined in
createSearchChoicePosition
• Optional
createSearchChoicePosition: string
| (list
: Select2Item
[], item
: Select2Item
) => void
Defined in
data
• Optional
data: any
Defined in
dropdownAutoWidth
• Optional
dropdownAutoWidth: boolean
Defined in
dropdownCss
• Optional
dropdownCss: any
Defined in
dropdownCssClass
• Optional
dropdownCssClass: any
Defined in
dropdownParent
• Optional
dropdownParent: (input
: HTMLElement
) => HTMLElement
Type declaration
▸ (input
): HTMLElement
Parameters
Name | Type |
---|---|
input |
HTMLElement |
Returns
HTMLElement
Defined in
element
• Optional
element: Select2Element
Defined in
escapeMarkup
• Optional
escapeMarkup: (p1
: string
) => string
Type declaration
▸ (p1
): string
Parameters
Name | Type |
---|---|
p1 |
string |
Returns
string
Defined in
formatAjaxError
• Optional
formatAjaxError: (p1
: any
, p2
: any
) => Select2FormatResult
Type declaration
▸ (p1
, p2
): Select2FormatResult
Parameters
Name | Type |
---|---|
p1 |
any |
p2 |
any |
Returns
Defined in
formatInputTooLong
• Optional
formatInputTooLong: (input
: string
, max
: number
) => Select2FormatResult
Type declaration
▸ (input
, max
): Select2FormatResult
Parameters
Name | Type |
---|---|
input |
string |
max |
number |
Returns
Defined in
formatInputTooShort
• Optional
formatInputTooShort: (input
: string
, min
: number
) => Select2FormatResult
Type declaration
▸ (input
, min
): Select2FormatResult
Parameters
Name | Type |
---|---|
input |
string |
min |
number |
Returns
Defined in
formatLoadMore
• Optional
formatLoadMore: (pageNumber
: number
) => Select2FormatResult
Type declaration
▸ (pageNumber
): Select2FormatResult
Parameters
Name | Type |
---|---|
pageNumber |
number |
Returns
Defined in
formatMatches
• Optional
formatMatches: (matches
: number
) => Select2FormatResult
Type declaration
▸ (matches
): Select2FormatResult
Parameters
Name | Type |
---|---|
matches |
number |
Returns
Defined in
formatNoMatches
• Optional
formatNoMatches: (input
: string
) => Select2FormatResult
Type declaration
▸ (input
): Select2FormatResult
Parameters
Name | Type |
---|---|
input |
string |
Returns
Defined in
formatResult
• Optional
formatResult: (p1
: any
, p2
: HTMLElement
, p3
: any
, p4
: (p1
: string
) => string
) => Select2FormatResult
Type declaration
▸ (p1
, p2
, p3
, p4
): Select2FormatResult
Parameters
Name | Type |
---|---|
p1 |
any |
p2 |
HTMLElement |
p3 |
any |
p4 |
(p1 : string ) => string |
Returns
Defined in
formatResultCssClass
• Optional
formatResultCssClass: (p1
: any
) => string
Type declaration
▸ (p1
): string
Parameters
Name | Type |
---|---|
p1 |
any |
Returns
string
Defined in
formatSearching
• Optional
formatSearching: () => Select2FormatResult
Type declaration
▸ (): Select2FormatResult
Returns
Defined in
formatSelection
• Optional
formatSelection: (p1
: any
, p2
: HTMLElement
, p3
: (p1
: string
) => string
) => Select2FormatResult
Type declaration
▸ (p1
, p2
, p3
): Select2FormatResult
Parameters
Name | Type |
---|---|
p1 |
any |
p2 |
HTMLElement |
p3 |
(p1 : string ) => string |
Returns
Defined in
formatSelectionCssClass
• Optional
formatSelectionCssClass: (item
: Select2Item
, container
: HTMLElement
) => string
Type declaration
▸ (item
, container
): string
Parameters
Name | Type |
---|---|
item |
Select2Item |
container |
HTMLElement |
Returns
string
Defined in
formatSelectionTooBig
• Optional
formatSelectionTooBig: (p1
: number
) => Select2FormatResult
Type declaration
▸ (p1
): Select2FormatResult
Parameters
Name | Type |
---|---|
p1 |
number |
Returns
Defined in
id
• Optional
id: (p1
: any
) => string
Type declaration
▸ (p1
): string
Parameters
Name | Type |
---|---|
p1 |
any |
Returns
string
Defined in
initSelection
• Optional
initSelection: (p1
: HTMLElement
, p2
: (p1
: any
) => void
) => void
Type declaration
▸ (p1
, p2
): void
Parameters
Name | Type |
---|---|
p1 |
HTMLElement |
p2 |
(p1 : any ) => void |
Returns
void
Defined in
loadMorePadding
• Optional
loadMorePadding: number
Defined in
matcher
• Optional
matcher: (p1
: string
, p2
: string
, p3
: HTMLElement
) => boolean
Type declaration
▸ (p1
, p2
, p3
): boolean
Parameters
Name | Type |
---|---|
p1 |
string |
p2 |
string |
p3 |
HTMLElement |
Returns
boolean
Defined in
maximumInputLength
• Optional
maximumInputLength: number
Defined in
maximumSelectionSize
• Optional
maximumSelectionSize: any
Defined in
minimumInputLength
• Optional
minimumInputLength: number
Defined in
minimumResultsForSearch
• Optional
minimumResultsForSearch: number
Defined in
multiple
• Optional
multiple: boolean
Defined in
nextSearchTerm
• Optional
nextSearchTerm: (p1
: any
, p2
: string
) => string
Type declaration
▸ (p1
, p2
): string
Parameters
Name | Type |
---|---|
p1 |
any |
p2 |
string |
Returns
string
Defined in
openOnEnter
• Optional
openOnEnter: boolean
Defined in
placeholder
• Optional
placeholder: string
Defined in
placeholderOption
• Optional
placeholderOption: any
Defined in
populateResults
• Optional
populateResults: (container
: HTMLElement
, results
: Select2Item
[], query
: Select2QueryOptions
) => void
Type declaration
▸ (container
, results
, query
): void
Parameters
Name | Type |
---|---|
container |
HTMLElement |
results |
Select2Item [] |
query |
Select2QueryOptions |
Returns
void
Defined in
query
• Optional
query: (p1
: Select2QueryOptions
) => void
Type declaration
▸ (p1
): void
Parameters
Name | Type |
---|---|
p1 |
Select2QueryOptions |
Returns
void
Defined in
searchInputPlaceholder
• Optional
searchInputPlaceholder: string
Defined in
selectOnBlur
• Optional
selectOnBlur: boolean
Defined in
separator
• Optional
separator: string
Defined in
shouldFocusInput
• Optional
shouldFocusInput: (p1
: any
) => boolean
Type declaration
▸ (p1
): boolean
Parameters
Name | Type |
---|---|
p1 |
any |
Returns
boolean
Defined in
sortResults
• Optional
sortResults: (p1
: any
, p2
: HTMLElement
, p3
: any
) => any
Type declaration
▸ (p1
, p2
, p3
): any
Parameters
Name | Type |
---|---|
p1 |
any |
p2 |
HTMLElement |
p3 |
any |
Returns
any
Defined in
tags
• Optional
tags: (string
| Select2Item
)[] | () => (string
| Select2Item
)[]
Defined in
tokenSeparators
• Optional
tokenSeparators: any
Defined in
tokenizer
• Optional
tokenizer: (p1
: string
, p2
: any
, p3
: (p1
: any
) => any
, p4
: any
) => string
Type declaration
▸ (p1
, p2
, p3
, p4
): string
Parameters
Name | Type |
---|---|
p1 |
string |
p2 |
any |
p3 |
(p1 : any ) => any |
p4 |
any |
Returns
string
Defined in
width
• Optional
width: any