@serenity-is/corelib / MultiSelect2
Class: MultiSelect2
Defined in: src/ui/editors/select2.tsx:3130
Extends
Constructors
Constructor
new MultiSelect2():
MultiSelect2
Returns
MultiSelect2
Inherited from
Properties
autofocus
protectedautofocus:boolean
Defined in: src/ui/editors/select2.tsx:1149
Inherited from
container
container:
HTMLElement
Defined in: src/ui/editors/select2.tsx:1150
Inherited from
containerEventName
protectedcontainerEventName:string
Defined in: src/ui/editors/select2.tsx:1152
Inherited from
AbstractSelect2.containerEventName
containerId
protectedcontainerId:string
Defined in: src/ui/editors/select2.tsx:1151
Inherited from
context
protectedcontext:any
Defined in: src/ui/editors/select2.tsx:1153
Inherited from
dropdown
dropdown:
HTMLElement
Defined in: src/ui/editors/select2.tsx:1154
Inherited from
elementTabIndex
protectedelementTabIndex:string
Defined in: src/ui/editors/select2.tsx:1155
Inherited from
AbstractSelect2.elementTabIndex
enabledInterface
protectedenabledInterface:boolean
Defined in: src/ui/editors/select2.tsx:1156
Inherited from
AbstractSelect2.enabledInterface
id()
protectedid: (item) =>string
Defined in: src/ui/editors/select2.tsx:1157
Parameters
item
any
Returns
string
Inherited from
nextSearchTerm
protectednextSearchTerm:string
Defined in: src/ui/editors/select2.tsx:1158
Inherited from
AbstractSelect2.nextSearchTerm
opts
protectedopts:Select2Options
Defined in: src/ui/editors/select2.tsx:1159
Inherited from
propertyObserver
protectedpropertyObserver:MutationObserver
Defined in: src/ui/editors/select2.tsx:1160
Inherited from
AbstractSelect2.propertyObserver
queryCount
protectedqueryCount:number
Defined in: src/ui/editors/select2.tsx:1161
Inherited from
results
protectedresults:HTMLElement
Defined in: src/ui/editors/select2.tsx:1162
Inherited from
resultsPage
protectedresultsPage:number
Defined in: src/ui/editors/select2.tsx:1163
Inherited from
search
search:
HTMLInputElement
Defined in: src/ui/editors/select2.tsx:1164
Inherited from
select
protectedselect:HTMLSelectElement
Defined in: src/ui/editors/select2.tsx:1374
Inherited from
selection
protectedselection:HTMLElement
Defined in: src/ui/editors/select2.tsx:1165
Inherited from
showSearchInput
protectedshowSearchInput:boolean
Defined in: src/ui/editors/select2.tsx:1166
Inherited from
AbstractSelect2.showSearchInput
Methods
addSelectedChoice()
protectedaddSelectedChoice(data):void
Defined in: src/ui/editors/select2.tsx:3594
Parameters
data
Returns
void
blur()
protectedblur():void
Defined in: src/ui/editors/select2.tsx:2429
Returns
void
Inherited from
buildChangeDetails()
protectedbuildChangeDetails(old,current):object
Defined in: src/ui/editors/select2.tsx:3795
Parameters
old
current
Returns
object
added
added:
Select2Item[] =currentCopy
removed
removed:
Select2Item[] =oldCopy
cancel()
protectedcancel(e?):void
Defined in: src/ui/editors/select2.tsx:3588
Parameters
e?
Event
Returns
void
Overrides
clearDropdownAlignmentPreference()
protectedclearDropdownAlignmentPreference():void
Defined in: src/ui/editors/select2.tsx:1832
Returns
void
Inherited from
AbstractSelect2.clearDropdownAlignmentPreference
clearPlaceholder()
protectedclearPlaceholder():void
Defined in: src/ui/editors/select2.tsx:3460
Returns
void
clearSearch()
protectedclearSearch():void
Defined in: src/ui/editors/select2.tsx:3444
Returns
void
Overrides
clearTouchMoved()
protectedclearTouchMoved():void
Defined in: src/ui/editors/select2.tsx:2105
Returns
void
Inherited from
AbstractSelect2.clearTouchMoved
close()
close():
void
Defined in: src/ui/editors/select2.tsx:3492
Returns
void
Overrides
countSelectableResults()
protectedcountSelectableResults():number
Defined in: src/ui/editors/select2.tsx:2109
Returns
number
Inherited from
AbstractSelect2.countSelectableResults
createContainer()
protectedcreateContainer():HTMLElement
Defined in: src/ui/editors/select2.tsx:3132
Returns
HTMLElement
Overrides
AbstractSelect2.createContainer
data()
Call Signature
data():
Select2Item[]
Defined in: src/ui/editors/select2.tsx:3893
Returns
Overrides
Call Signature
data(
values,triggerChange?):void
Defined in: src/ui/editors/select2.tsx:3894
Parameters
values
triggerChange?
boolean
Returns
void
Overrides
AbstractSelect2.data
destroy()
destroy():
void
Defined in: src/ui/editors/select2.tsx:3221
Returns
void
Overrides
disable()
disable():
void
Defined in: src/ui/editors/select2.tsx:1695
Returns
void
Inherited from
enable()
enable(
enabled?):void
Defined in: src/ui/editors/select2.tsx:1686
Parameters
enabled?
boolean
Returns
void
Inherited from
enableInterface()
protectedenableInterface():boolean
Defined in: src/ui/editors/select2.tsx:3414
Returns
boolean
Overrides
AbstractSelect2.enableInterface
ensureHighlightVisible()
protectedensureHighlightVisible():void
Defined in: src/ui/editors/select2.tsx:2004
Returns
void
Inherited from
AbstractSelect2.ensureHighlightVisible
externalSearch()
protectedexternalSearch(term):void
Defined in: src/ui/editors/select2.tsx:1990
Opens control, sets input value, and updates results.
Parameters
term
string
Returns
void
Inherited from
AbstractSelect2.externalSearch
findHighlightableChoices()
protectedfindHighlightableChoices():Element[]
Defined in: src/ui/editors/select2.tsx:2051
Returns
Element[]
Inherited from
AbstractSelect2.findHighlightableChoices
focus()
focus():
void
Defined in: src/ui/editors/select2.tsx:3497
Returns
void
Overrides
focusSearch()
protectedfocusSearch():void
Defined in: src/ui/editors/select2.tsx:2441
Returns
void
Inherited from
getMaximumSelectionSize()
protectedgetMaximumSelectionSize():any
Defined in: src/ui/editors/select2.tsx:2000
Returns
any
Inherited from
AbstractSelect2.getMaximumSelectionSize
getMaxSearchWidth()
protectedgetMaxSearchWidth():number
Defined in: src/ui/editors/select2.tsx:3737
Returns
number
getPlaceholder()
protectedgetPlaceholder():string
Defined in: src/ui/editors/select2.tsx:2462
Returns
string
Inherited from
AbstractSelect2.getPlaceholder
getPlaceholderOption()
protectedgetPlaceholderOption():HTMLOptionElement
Defined in: src/ui/editors/select2.tsx:2470
Returns
HTMLOptionElement
Inherited from
AbstractSelect2.getPlaceholderOption
getVal()
protectedgetVal():string[]
Defined in: src/ui/editors/select2.tsx:3769
Returns
string[]
handleSearchBlur()
protectedhandleSearchBlur():void
Defined in: src/ui/editors/select2.tsx:2194
Returns
void
Inherited from
AbstractSelect2.handleSearchBlur
handleSearchFocus()
protectedhandleSearchFocus():void
Defined in: src/ui/editors/select2.tsx:2190
Returns
void
Inherited from
AbstractSelect2.handleSearchFocus
handleSearchInput()
protectedhandleSearchInput():void
Defined in: src/ui/editors/select2.tsx:2186
Returns
void
Inherited from
AbstractSelect2.handleSearchInput
highlight()
protectedhighlight(index?):number
Defined in: src/ui/editors/select2.tsx:2069
Parameters
index?
number
Returns
number
Inherited from
highlightUnderEvent()
protectedhighlightUnderEvent(event):void
Defined in: src/ui/editors/select2.tsx:2113
Parameters
event
Event
Returns
void
Inherited from
AbstractSelect2.highlightUnderEvent
init()
init(
opts):void
Defined in: src/ui/editors/select2.tsx:1178
Parameters
opts
Returns
void
Inherited from
initContainer()
protectedinitContainer():void
Defined in: src/ui/editors/select2.tsx:3236
Returns
void
Overrides
initContainerWidth()
protectedinitContainerWidth():void
Defined in: src/ui/editors/select2.tsx:2490
Get the desired width for the container element. This is
derived first from option width passed to select2, then
the inline 'style' on the original element, and finally
falls back to the jQuery calculated element width.
Returns
void
Inherited from
AbstractSelect2.initContainerWidth
initSelection()
protectedinitSelection():void
Defined in: src/ui/editors/select2.tsx:3422
Returns
void
Overrides
isFocused()
isFocused():
boolean
Defined in: src/ui/editors/select2.tsx:3502
Returns
boolean
Overrides
isInterfaceEnabled()
protectedisInterfaceEnabled():boolean
Defined in: src/ui/editors/select2.tsx:1669
Returns
boolean
Inherited from
AbstractSelect2.isInterfaceEnabled
loadMoreIfNeeded()
protectedloadMoreIfNeeded():void
Defined in: src/ui/editors/select2.tsx:2124
Returns
void
Inherited from
AbstractSelect2.loadMoreIfNeeded
monitorSource()
protectedmonitorSource():void
Defined in: src/ui/editors/select2.tsx:1618
Monitor the original element for changes and update select2 accordingly
Returns
void
Inherited from
moveHighlight()
protectedmoveHighlight(delta):void
Defined in: src/ui/editors/select2.tsx:2055
Parameters
delta
number
Returns
void
Inherited from
onSelect()
protectedonSelect(data,options):void
Defined in: src/ui/editors/select2.tsx:3537
Parameters
data
options
any
Returns
void
Overrides
onSortEnd()
protectedonSortEnd():void
Defined in: src/ui/editors/select2.tsx:3874
Returns
void
onSortStart()
protectedonSortStart():void
Defined in: src/ui/editors/select2.tsx:3863
Returns
void
open()
open():
boolean
Defined in: src/ui/editors/select2.tsx:1844
Opens the dropdown
Returns
boolean
whether or not dropdown was opened. This method will return false if, for example, the dropdown is already open, or if the 'open' event listener on the element called preventDefault().
Inherited from
opened()
opened():
boolean
Defined in: src/ui/editors/select2.tsx:1708
Returns
boolean
Inherited from
opening()
protectedopening():void
Defined in: src/ui/editors/select2.tsx:3467
Performs the opening of the dropdown
Returns
void
Overrides
optionToData()
optionToData(
element):Select2Item
Defined in: src/ui/editors/select2.tsx:1354
Parameters
element
HTMLOptGroupElement | HTMLOptionElement
Returns
Inherited from
positionDropdown()
positionDropdown():
void
Defined in: src/ui/editors/select2.tsx:1712
Returns
void
Inherited from
AbstractSelect2.positionDropdown
postprocessResults()
protectedpostprocessResults(data?,initial?,noHighlightUpdate?):void
Defined in: src/ui/editors/select2.tsx:3693
Parameters
data?
initial?
boolean
noHighlightUpdate?
boolean
Returns
void
Overrides
AbstractSelect2.postprocessResults
prepareOpts()
protectedprepareOpts(opts):Select2Options
Defined in: src/ui/editors/select2.tsx:3148
Parameters
opts
Returns
Overrides
readonly()
readonly(
enabled?):void
Defined in: src/ui/editors/select2.tsx:1699
Parameters
enabled?
boolean
Returns
void
Inherited from
removeHighlight()
protectedremoveHighlight():void
Defined in: src/ui/editors/select2.tsx:2097
Returns
void
Inherited from
AbstractSelect2.removeHighlight
resizeSearch()
protectedresizeSearch():void
Defined in: src/ui/editors/select2.tsx:3741
Returns
void
selectChoice()
protectedselectChoice(choice):void
Defined in: src/ui/editors/select2.tsx:3203
Parameters
choice
HTMLElement
Returns
void
selectHighlighted()
protectedselectHighlighted(options?):void
Defined in: src/ui/editors/select2.tsx:2445
Parameters
options?
any
Returns
void
Inherited from
AbstractSelect2.selectHighlighted
setVal()
protectedsetVal(val):void
Defined in: src/ui/editors/select2.tsx:3780
Parameters
val
string[]
Returns
void
shouldOpen()
protectedshouldOpen():boolean
Defined in: src/ui/editors/select2.tsx:1822
Returns
boolean
Inherited from
tokenize()
protectedtokenize():string
Defined in: src/ui/editors/select2.tsx:3525
Default tokenizer function which does nothing
Returns
string
Overrides
touchMoved()
protectedtouchMoved():void
Defined in: src/ui/editors/select2.tsx:2101
Returns
void
Inherited from
triggerChange()
protectedtriggerChange(details?):void
Defined in: src/ui/editors/select2.tsx:1650
Triggers the change event on the source element
Parameters
details?
any
Returns
void
Inherited from
triggerSelect()
protectedtriggerSelect(data):boolean
Defined in: src/ui/editors/select2.tsx:1641
Parameters
data
Returns
boolean
Inherited from
unselect()
protectedunselect(selected):boolean
Defined in: src/ui/editors/select2.tsx:3655
Parameters
selected
HTMLElement
Returns
boolean
updateResults()
protectedupdateResults(initial?):void
Defined in: src/ui/editors/select2.tsx:2255
Parameters
initial?
boolean
whether or not this is the call to this method right after the dropdown has been opened
Returns
void
Inherited from
updateSelection()
protectedupdateSelection(data):void
Defined in: src/ui/editors/select2.tsx:3506
Parameters
data
Returns
void
val()
val(
val?,triggerChange?):string[]
Defined in: src/ui/editors/select2.tsx:3816
Parameters
val?
string[]
triggerChange?
boolean
Returns
string[]