UNPKG

ngx-mat-dropdown

Version:
69 lines (68 loc) 2.8 kB
import { AfterViewInit, ChangeDetectorRef, ElementRef, OnDestroy, OnInit, QueryList } from '@angular/core'; import { ControlValueAccessor } from '@angular/forms'; import { MatSelect } from '@angular/material/select'; import { MatCheckboxChange } from '@angular/material/checkbox'; import { MatOption } from '@angular/material/core'; export declare class MatSelectSearchComponent implements OnInit, OnDestroy, AfterViewInit, ControlValueAccessor { matSelect: MatSelect; private changeDetectorRef; matOption: MatOption; /** Label of the search placeholder */ placeholderLabel: string; multiple: boolean; showSearch: boolean; /** Label to be shown when no entries are found. Set to null if no message should be shown. */ noEntriesFoundLabel: string; /** Reference to the search input field */ searchSelectInput: ElementRef; innerSelectSearch: ElementRef; get isInsideMatOption(): boolean; /** Current search value */ get value(): string; private _value; onChange: Function; onTouched: Function; /** Reference to the MatSelect options */ _options: QueryList<MatOption>; /** Previously selected values when using <mat-select [multiple]="true">*/ private previousSelectedValues; /** Whether the backdrop class has been set */ private overlayClassSet; /** Event that emits when the current value changes */ private change; private AllClicked; /** Subject that emits when the component has been destroyed. */ private _onDestroy; constructor(matSelect: MatSelect, changeDetectorRef: ChangeDetectorRef, matOption?: MatOption); ngOnInit(): void; ngOnDestroy(): void; ngAfterViewInit(): void; _handleKeydown(event: KeyboardEvent): void; writeValue(value: string): void; onInputChange(value: any): void; onBlur(value: string): void; registerOnChange(fn: Function): void; registerOnTouched(fn: Function): void; _focus(): void; /** * Resets the current search value * {boolean} focus whether to focus after resetting * */ _reset(focus?: boolean): void; /** * Sets the overlay class to correct offsetY * so that the selected option is at the position of the select box when opening */ private setOverlayClass; /** * Initializes handling <mat-select [multiple]="true"> * Note: to improve this code, mat-select should be extended to allow disabling resetting the selection while filtering. */ private initMultipleHandling; private getWidth; _noEntriesFound(): boolean; toggleSelection(change: MatCheckboxChange, check: any): void; ischecked(check: any): boolean; isIndeterminate(): boolean; }