File

qwc/projects/qwc/src/lib/components/qwc-simple-select/qwc-simple-select.component.ts

Implements

OnChanges OnDestroy

Metadata

selector qwc-simple-select
templateUrl qwc-simple-select.component.html

Index

Properties
Methods
Inputs
Outputs
Accessors

Constructor

constructor(cdref: ChangeDetectorRef)
Parameters :
Name Type Optional
cdref ChangeDetectorRef No

Inputs

ariaLabel
Type : string | null
Default value : null
config
Type : QwcSelectConfig
Default value : { placeHolder: "Select", idKey: "id", showDropdownArrow: true, showSelectedItem: true, searchable: true, searchField: "name", closeOnSelect: true, multiSelect: false, popoverClass: "dropdown", enableClear: false, childrenKey: "children", showHierarchyLines: false }
disabled
Type : boolean
enableKeyboardSupport
Default value : false
focusTabIndex
Default value : 0
options
Type : any
Default value : []
selected
Default value : []

Outputs

change
Type : EventEmitter
dropdownClose
Type : EventEmitter
dropdownOpen
Type : EventEmitter
rightKeyPressed
Type : EventEmitter

Methods

applyDropDownStyles
applyDropDownStyles(element, triggerBtn)

Apply drop down styles

Parameters :
Name Optional Description
element No

Element

triggerBtn No

Trigger button

Returns : void

void

attachListeners
attachListeners()

Attach Listeners

Returns : void
checkOptionInSelection
checkOptionInSelection(__option, __options)

Check option in selectopm

Parameters :
Name Optional Description
__option No

option

__options No

Options

Returns : any

any

clickEventHandler
clickEventHandler(event)

Click Event Handler

Parameters :
Name Optional Description
event No

event

Returns : void
closeCurrentDropdown
closeCurrentDropdown(event?: any)

Close current dropdown

Parameters :
Name Type Optional
event any Yes
Returns : void

void

detachListeners
detachListeners()

Detach Listeners

Returns : void
filterComplexOptions
filterComplexOptions(optionsViewModel, optionSearchText, filteredOptions: any[])

Filter Complex Options

Parameters :
Name Type Optional Default value Description
optionsViewModel No

Options view model

optionSearchText No

Search text

filteredOptions any[] No []

Filtered Options

Returns : {}

any[]

filterValues
filterValues(optionSearchText)

Search handler

Parameters :
Name Optional Description
optionSearchText No

Search text

Returns : void

void

getValue
getValue(__option)

Get value

Parameters :
Name Optional Description
__option No

Option

Returns : string | number

string | number

handleTab
handleTab(event: any)

Handle tab key for focus or dropdown close.

Parameters :
Name Type Optional Description
event any No

Event

Returns : void

void

isComplexType
isComplexType(__option)

Is complex type

Parameters :
Name Optional Description
__option No

Option

Returns : boolean

boolean

keyDownEventHandler
keyDownEventHandler(event)

Key Down Event Handler

Parameters :
Name Optional Description
event No

event

Returns : void
ngOnChanges
ngOnChanges(changes: literal type)

Component lifecycle hook

Parameters :
Name Type Optional Description
changes literal type No

Changes

Returns : void

void

ngOnDestroy
ngOnDestroy()

Component lifecycle hook

Returns : void

void

onRightKeyPress
onRightKeyPress(option)

On right key press event

Parameters :
Name Optional
option No
Returns : void

void

optionChanged
optionChanged(__option, event?: any)

Option changed

Parameters :
Name Type Optional Description
__option No

Option

event any Yes
Returns : void

void

removeSelection
removeSelection(option)

Remove selection

Parameters :
Name Optional Description
option No

Option

Returns : void

void

selectSearchInput
selectSearchInput(event)

Select search input

Parameters :
Name Optional Description
event No

Event

Returns : void

void

toggleDropdown
toggleDropdown(event)

Toggle dropdown

Parameters :
Name Optional Description
event No

Event

Returns : void

void

wheelEventHandler
wheelEventHandler(event)

Wheel Event Handler

Parameters :
Name Optional Description
event No

event

Returns : void

Properties

clickEventRef
Type : any
customFooterTemplate
Type : QwcDropdownFooterDirective
Decorators :
@ContentChild(QwcDropdownFooterDirective)
customHeaderTemplate
Type : QwcDropdownHeaderDirective
Decorators :
@ContentChild(QwcDropdownHeaderDirective)
customIconTemplate
Type : QwcDropdownIconDirective
Decorators :
@ContentChild(QwcDropdownIconDirective)
customSelectionTemplate
Type : QwcSelectedOptionDirective
Decorators :
@ContentChild(QwcSelectedOptionDirective)
customTemplate
Type : QwcDropdownItemDirective
Decorators :
@ContentChild(QwcDropdownItemDirective)
handleClick
Default value : false
isDDStylingSet
Default value : false
keyEventRef
Type : any
minWidth
Type : number
Default value : 225
optionsViewModel
Type : any
Default value : this._clone(this.options)
qwcscdropdown
Type : ElementRef
Decorators :
@ViewChild('qwcscdropdown')
qwcscOverlay
Type : ElementRef
Decorators :
@ViewChild('qwcscOverlay', {static: false})
rowTemplateChildren
Type : QueryList<QwcSimpleSelectDropdownItemsComponent>
Decorators :
@ViewChildren(undefined)
searchInput
Type : ElementRef
selectedOptionIndex
Default value : this.optionsViewModel.indexOf(this.optionsViewModel .find(((__option) => __option[this.config.idKey] === this.selected)))
selectedOptionsArr
Type : any
Default value : []
showDropdown
Default value : false
triggerRef
Type : ElementRef
Decorators :
@ViewChild('triggerBtn')
wheelEventRef
Type : any

Accessors

focusSearchEl
setfocusSearchEl(searchEl)
Parameters :
Name Optional
searchEl No
Returns : void

result-matching ""

    No results matching ""