auto-complete.d.ts 1.72 KB
import { OnInit, EventEmitter, AfterViewInit } from '@angular/core';
import { ControlValueAccessor } from '@angular/forms';
import { Request } from '../_services/request.service';
import DataSource from 'devextreme/data/data_source';
export declare class SocAutoCompleteComponent implements ControlValueAccessor, OnInit, AfterViewInit {
    private request;
    filteredOptions: any[];
    /** local, remote */
    mode: 'local' | 'remote' | 'dropdown';
    /** API ที่ต้องการเรียกใช้เมื่อพิมพ์ auto complete */
    api: string;
    /** field ที่ต้องการ query เมื่อยิง API */
    field: string;
    id: string;
    placeholder: string;
    value: String;
    disabled: boolean;
    orderBy: string;
    filter: string;
    limit: number;
    onLoad: EventEmitter<any>;
    valueChange: EventEmitter<string>;
    resData: any[];
    openOnFieldClick: boolean;
    showDropDownButton: boolean;
    acceptCustomValue: boolean;
    searchEnabled: boolean;
    inputValue: string;
    /** ds */
    ds: DataSource;
    constructor(request: Request);
    ngOnInit(): Promise<void>;
    ngAfterViewInit(): void;
    fnStartDataSourceLocal(): Promise<void>;
    fnStartDataSourceRemote(): Promise<void>;
    fnGetCustomStore(key: any): Promise<any[]>;
    fnCustomStoreOnLoaded: (result: any[]) => any[];
    onValueChanged(e: any): void;
    fnPreResponse(params: any): Promise<any[]>;
    onOpened(e: any): void;
    /** START Bind Value */
    onModelChange: Function;
    onModelTouched: Function;
    writeValue(value: any): void;
    registerOnChange(fn: Function): void;
    registerOnTouched(fn: Function): void;
}
export declare class SharedAutoCompleteModule {
}