|
|
|
@@ -20,16 +20,17 @@ export class PagingComponent implements OnInit, AfterViewInit { |
|
|
|
|
|
|
|
@ViewChild(MatPaginator) public paginator!: MatPaginator; |
|
|
|
|
|
|
|
private defaultPageSize: number = 10; |
|
|
|
private defaultPageSizeOptions: number[] = [10,20,50]; |
|
|
|
protected defaultPageSize: number = 10; |
|
|
|
protected defaultPageSizeOptions: number[] = [10,20,50]; |
|
|
|
|
|
|
|
public dataLength: number; |
|
|
|
public pageEvent: PageEvent; |
|
|
|
protected dataLength: number; |
|
|
|
protected pageEvent: PageEvent; |
|
|
|
protected pageIndex: number; |
|
|
|
public searchForm!: FormGroup; |
|
|
|
public loadingSub: Subscription; |
|
|
|
public loading: boolean = false; |
|
|
|
public showLoading: boolean = false; |
|
|
|
protected searchForm!: FormGroup; |
|
|
|
protected loadingSub: Subscription; |
|
|
|
protected loading: boolean = false; |
|
|
|
protected showLoading: boolean = false; |
|
|
|
protected dataInitialized: boolean = false; |
|
|
|
|
|
|
|
constructor( |
|
|
|
private fb: FormBuilder, |
|
|
|
@@ -100,6 +101,11 @@ export class PagingComponent implements OnInit, AfterViewInit { |
|
|
|
return this.pageSize; |
|
|
|
} |
|
|
|
|
|
|
|
setDataLength(dataLength: number): void { |
|
|
|
this.dataInitialized = true; |
|
|
|
this.dataLength = dataLength; |
|
|
|
} |
|
|
|
|
|
|
|
clearForm() { |
|
|
|
this.searchForm.get('inputText')!.setValue(''); |
|
|
|
} |
|
|
|
|