@nova-ui/bits
Version:
SolarWinds Nova Framework
33 lines (32 loc) • 1.94 kB
TypeScript
import { LiveAnnouncer } from "@angular/cdk/a11y";
import { AfterContentInit, ChangeDetectorRef, ElementRef, OnChanges, OnDestroy, SimpleChanges, TemplateRef } from "@angular/core";
import { OptionValueType } from "../../public-api";
import { BaseSelectV2 } from "../base-select-v2";
import { SelectV2OptionComponent } from "../option/select-v2-option.component";
import { OptionKeyControlService } from "../option-key-control.service";
import * as i0 from "@angular/core";
export declare class SelectV2Component extends BaseSelectV2 implements AfterContentInit, OnDestroy, OnChanges {
liveAnnouncer: LiveAnnouncer;
/** Sets a custom template for displaying it in the Option */
displayValueTemplate: TemplateRef<any>;
/** Value of the selected Option that derives in the Select */
displayText: string;
constructor(elRef: ElementRef<HTMLElement>, optionKeyControlService: OptionKeyControlService<SelectV2OptionComponent>, cdRef: ChangeDetectorRef, liveAnnouncer: LiveAnnouncer);
ngOnChanges(changes: SimpleChanges): void;
ngAfterContentInit(): void;
/** Selects specific Option and set its value to the model */
selectOption(option: SelectV2OptionComponent): void;
/** Sets value to the model */
writeValue(value: OptionValueType | OptionValueType[]): void;
/** Checks whether value of the Select is empty */
get isEmpty(): boolean;
/**
* Calls to ngOnDestroy do not automatically get propagated to base classes.
* This can lead to memory leaks.
* This is a safe guard for preventing memory leaks in derived classes.
*/
ngOnDestroy(): void;
private defineDisplayText;
static ɵfac: i0.ɵɵFactoryDeclaration<SelectV2Component, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<SelectV2Component, "nui-select-v2", never, { "displayValueTemplate": { "alias": "displayValueTemplate"; "required": false; }; }, {}, never, ["*"], false, never>;
}