ngx-mat-dynamic-table
Version:
Dynamic material table table.
31 lines (30 loc) • 1.08 kB
TypeScript
import { OnInit, ElementRef, OnDestroy, EventEmitter } from '@angular/core';
import { FormControl } from '@angular/forms';
import { Subject, Subscription } from 'rxjs';
import { CdkDragDrop } from '@angular/cdk/drag-drop';
export interface SearchTerm {
type: 'column' | 'global';
inputReference?: any;
column?: string;
columnTitle?: string;
search: string;
searchType?: '=' | '!=' | '>=' | '<=' | 'empty';
}
export declare class TableSearchInputComponent implements OnInit, OnDestroy {
columnSearch$: Subject<SearchTerm>;
visible: boolean;
selectable: boolean;
separatorKeysCodes: number[];
searchCtrl: FormControl;
searchTerms: SearchTerm[];
columnSearchSubscription: Subscription;
searchInput: ElementRef<HTMLInputElement>;
searchChange: EventEmitter<SearchTerm[]>;
constructor();
ngOnInit(): void;
add(event: any): void;
remove(searchTerm: SearchTerm): void;
orderChanged(event: CdkDragDrop<SearchTerm[]>): void;
emitNewSearch(): void;
ngOnDestroy(): void;
}