UNPKG

@asi-ngtools/lib

Version:

This project is a little components library, simple to use, which will help you to simplify your project.

44 lines (43 loc) 1.67 kB
import { OnInit, ElementRef, OnChanges, Renderer2 } from '@angular/core'; import { FormControl } from '@angular/forms'; import { DefaultControlValueAccessor } from './../../common/default-control-value-accessor'; import { AsiComponentTemplateOptionDef, AsiComponentTemplateTagDef } from './../../common/asi-component-template'; /** * asi-autocomplete-multiple component */ export declare class AsiAutoCompleteMultipleComponent extends DefaultControlValueAccessor implements OnInit, OnChanges { private renderer; /** html id */ id: string; /** html name */ name: string; /** Label to display (is translated) */ label: string; /** Label position */ labelPosition: 'top' | 'left' | 'right' | 'bottom' | 'bottom-center' | 'top-center'; /** Placeholder if needed */ placeholder: string; /** Delay between the moment you stop typing and onRequestData is called */ delay: number; /** Option to keep the list open once an item is selected */ closeAfterSelect: boolean; /** Function called to request new data (can return Observable/Promise/Object) : Throw error if null */ onRequestData: Function; optionDef: AsiComponentTemplateOptionDef; tagDef: AsiComponentTemplateTagDef; container: ElementRef; data: Array<any>; autoCompleteControl: FormControl; open: boolean; firstRequestDone: Boolean; init: boolean; currentValue: any; constructor(renderer: Renderer2); private checkInput(); ngOnInit(): void; onDropdownClose(): void; ngOnChanges(): void; addValue(data: any): void; removeValue(data: any): void; writeValue(value: any): void; }