src/lib/pg-components/select/select.component.ts
Example of usage:
OnInit
AfterContentInit
AfterContentChecked
ControlValueAccessor
encapsulation | ViewEncapsulation.None |
selector | mefdev-select |
templateUrl | ./select.component.html |
constructor(_elementRef: ElementRef, _renderer: Renderer2, cDRef: ChangeDetectorRef)
|
||||||||||||
Parameters :
|
AllowClear |
Type : boolean
|
Disabled |
Type : boolean
|
Filter |
Type : boolean
|
Default value : true
|
FirstDefault |
Type : boolean
|
Default value : false
|
KeepUnListOptions |
Type : boolean
|
MaxMultiple |
Type : any
|
Default value : Infinity
|
Mode |
Type : string
|
Multiple |
Type : boolean
|
NotFoundContent |
Type : string
|
Open |
Type : boolean
|
PlaceHolder |
Type : string
|
ShowSearch |
Type : boolean
|
Size |
Type : string
|
Tags |
Type : boolean
|
change |
Type : EventEmitter<string>
|
OpenChange |
Type : EventEmitter<boolean>
|
ScrollToBottom |
Type : EventEmitter<boolean>
|
SearchChange |
Type : EventEmitter<string>
|
click |
Arguments : '$event'
|
click(e: MouseEvent)
|
keydown |
Arguments : '$event'
|
keydown(e: KeyboardEvent)
|
_getTriggerRect |
_getTriggerRect()
|
Returns :
ClientRect
|
_setTriggerWidth |
_setTriggerWidth()
|
Returns :
void
|
checkDropDownScroll |
checkDropDownScroll()
|
Returns :
void
|
chooseOption | ||||||||||||||||
chooseOption(option: MefDevOptionComponent, isUserClick: boolean, $event?: MouseEvent)
|
||||||||||||||||
choose option
Parameters :
Returns :
void
|
clearAllSelectedOption | ||||||||
clearAllSelectedOption(emitChange: boolean)
|
||||||||
Parameters :
Returns :
void
|
clearSearchText |
clearSearchText()
|
Returns :
void
|
clearSelect | ||||||
clearSelect($event?: MouseEvent)
|
||||||
clear single selected option
Parameters :
Returns :
void
|
clickOption | |||||||||
clickOption(option: MefDevOptionComponent, $event?: MouseEvent)
|
|||||||||
click dropdown option by user
Parameters :
Returns :
void
|
closeDropDown |
closeDropDown()
|
Returns :
void
|
compositionEnd |
compositionEnd()
|
Returns :
void
|
compositionStart |
compositionStart()
|
Returns :
void
|
dropDownScroll | ||||||
dropDownScroll(ul: HTMLUListElement)
|
||||||
Parameters :
Returns :
void
|
emitMultipleOptions |
emitMultipleOptions()
|
emit multiple options
Returns :
void
|
flushComponentState |
flushComponentState()
|
Returns :
void
|
forceUpdateSelectedOption | ||||||
forceUpdateSelectedOption(value: string | string[])
|
||||||
Parameters :
Returns :
void
|
handleKeyBackspaceEvent | ||||||
handleKeyBackspaceEvent(event: KeyboardEvent)
|
||||||
Parameters :
Returns :
void
|
handleKeyDownEvent | ||||||
handleKeyDownEvent($event: MouseEvent)
|
||||||
Parameters :
Returns :
void
|
handleKeyEnterEvent | ||||||
handleKeyEnterEvent(event: KeyboardEvent)
|
||||||
Parameters :
Returns :
void
|
handleKeyUpEvent | ||||||
handleKeyUpEvent($event: MouseEvent)
|
||||||
Parameters :
Returns :
void
|
isInSet | |||||||||
isInSet(set: Set<MefDevOptionComponent>, option: MefDevOptionComponent)
|
|||||||||
determine if option in set
Parameters :
Returns :
MefDevOptionComponent
|
nextOption | |||||||||
nextOption(option: MefDevOptionComponent, options: MefDevOptionComponent[])
|
|||||||||
Parameters :
Returns :
MefDevOptionComponent
|
onClick | ||||||
onClick(e: MouseEvent)
|
||||||
Decorators :
@HostListener('click', ['$event'])
|
||||||
Parameters :
Returns :
void
|
onKeyDown | ||||||
onKeyDown(e: KeyboardEvent)
|
||||||
Decorators :
@HostListener('keydown', ['$event'])
|
||||||
Parameters :
Returns :
void
|
onPositionChange | ||||||
onPositionChange(position: ConnectedOverlayPositionChange)
|
||||||
dropdown position changed
Parameters :
Returns :
void
|
onSearchChange | ||||||
onSearchChange(searchValue: string)
|
||||||
Parameters :
Returns :
void
|
preOption | |||||||||
preOption(option: MefDevOptionComponent, options: MefDevOptionComponent[])
|
|||||||||
Parameters :
Returns :
MefDevOptionComponent
|
registerOnChange | ||||||
registerOnChange(fn: (value: string | string[]) => void)
|
||||||
Parameters :
Returns :
void
|
registerOnTouched | ||||||
registerOnTouched(fn: () => void)
|
||||||
Parameters :
Returns :
void
|
removeOption | ||||||
removeOption(option: MefDevOptionComponent)
|
||||||
-option remove or tags remove
Parameters :
Returns :
void
|
scrollToActive |
scrollToActive()
|
Returns :
void
|
selectMultipleOption | |||||||||
selectMultipleOption(option: MefDevOptionComponent, $event?: MouseEvent)
|
|||||||||
select multiple option
Parameters :
Returns :
void
|
setClassMap |
setClassMap()
|
Returns :
void
|
setDisabledState | ||||||
setDisabledState(isDisabled: boolean)
|
||||||
Parameters :
Returns :
void
|
setDropDownClassMap |
setDropDownClassMap()
|
Returns :
void
|
updateFilterOption | ||||||||
updateFilterOption(updateActiveFilter: boolean)
|
||||||||
Parameters :
Returns :
void
|
updateSelectedOption | ||||||||||||
updateSelectedOption(currentModelValue: string | string[], triggerByNgModel: boolean)
|
||||||||||||
update selected option when add remove option etc
Parameters :
Returns :
void
|
updateWidth | |||||||||
updateWidth(element: HTMLInputElement, text: string)
|
|||||||||
Parameters :
Returns :
void
|
writeValue | ||||||
writeValue(value: string | string[])
|
||||||
Parameters :
Returns :
void
|
_activeFilterOption |
Type : MefDevOptionComponent
|
_cacheOptions |
Type : MefDevOptionComponent[]
|
Default value : []
|
_cdkOverlay |
Type : CdkConnectedOverlay
|
Decorators :
@ViewChild(CdkConnectedOverlay)
|
_classList |
Type : string[]
|
Default value : []
|
_composing |
Default value : false
|
_dropDownClassMap |
Type : any
|
_dropDownPosition |
Type : "top" | "center" | "bottom"
|
Default value : "bottom"
|
_dropDownPrefixCls |
Default value : `${this._prefixCls}-dropdown`
|
_el |
Type : HTMLElement
|
_filterOptions |
Type : MefDevOptionComponent[]
|
Default value : []
|
_isMultiInit |
Default value : false
|
_isOpen |
Default value : false
|
_mode |
Type : any
|
_notFoundContent |
Type : string
|
Default value : "No Content"
|
_operatingMultipleOption |
Type : MefDevOptionComponent
|
_options |
Type : MefDevOptionComponent[]
|
Default value : []
|
_placeholder |
Type : string
|
Default value : "placeholder"
|
_prefixCls |
Type : string
|
Default value : "pg-select"
|
_searchText |
Type : string
|
Default value : ""
|
_selectedOption |
Type : MefDevOptionComponent
|
_selectedOptions |
Type : Set<MefDevOptionComponent>
|
Default value : new Set()
|
_selectionClassMap |
Type : any
|
_selectionPrefixCls |
Default value : `${this._prefixCls}-selection`
|
_size |
Type : string
|
_tagsOptions |
Type : MefDevOptionComponent[]
|
Default value : []
|
_triggerWidth |
Type : number
|
Default value : 0
|
_value |
Type : string[] | string
|
addOption |
Default value : () => {...}
|
new -option insert or new tags insert |
dropdownUl |
Type : ElementRef
|
Decorators :
@ViewChild('dropdownUl')
|
onChange |
Type : function
|
Default value : () => {...}
|
onTouched |
Type : function
|
Default value : () => {...}
|
searchInputElementRef |
Type : any
|
Decorators :
@ViewChild('searchInput')
|
trigger |
Type : ElementRef
|
Decorators :
@ViewChild('trigger')
|
unSelectMultipleOption |
Default value : () => {...}
|
cancel select multiple option |
AllowClear | ||||||
getAllowClear()
|
||||||
setAllowClear(value: boolean)
|
||||||
Parameters :
Returns :
void
|
KeepUnListOptions | ||||||
getKeepUnListOptions()
|
||||||
setKeepUnListOptions(value: boolean)
|
||||||
Parameters :
Returns :
void
|
Mode | ||||||
setMode(value: string)
|
||||||
Parameters :
Returns :
void
|
Multiple | ||||||
getMultiple()
|
||||||
setMultiple(value: boolean)
|
||||||
Parameters :
Returns :
void
|
PlaceHolder | ||||||
getPlaceHolder()
|
||||||
setPlaceHolder(value: string)
|
||||||
Parameters :
Returns :
void
|
NotFoundContent | ||||||
getNotFoundContent()
|
||||||
setNotFoundContent(value: string)
|
||||||
Parameters :
Returns :
void
|
Size | ||||||
getSize()
|
||||||
setSize(value: string)
|
||||||
Parameters :
Returns :
void
|
ShowSearch | ||||||
getShowSearch()
|
||||||
setShowSearch(value: boolean)
|
||||||
Parameters :
Returns :
void
|
Tags | ||||||
getTags()
|
||||||
setTags(value: boolean)
|
||||||
Parameters :
Returns :
void
|
Disabled | ||||||
getDisabled()
|
||||||
setDisabled(value: boolean)
|
||||||
Parameters :
Returns :
void
|
Open | ||||||
getOpen()
|
||||||
setOpen(value: boolean)
|
||||||
Parameters :
Returns :
void
|
Value | ||||||
getValue()
|
||||||
setValue(value: string | string[])
|
||||||
Parameters :
Returns :
void
|