[DSC-389] pagination added.

This commit is contained in:
Pratik Rajkotiya
2022-02-02 14:05:10 +05:30
parent 1de409d6a4
commit e4d099df43
14 changed files with 239 additions and 55 deletions

View File

@@ -76,11 +76,26 @@ export class ObjectListComponent {
*/
@Input() importConfig: { importLabel: string };
/**
* Whether or not the pagination should be rendered as simple previous and next buttons instead of the normal pagination
*/
@Input() showPaginator = true;
/**
* Emit when one of the listed object has changed.
*/
@Output() contentChange = new EventEmitter<any>();
/**
* If showPaginator is set to true, emit when the previous button is clicked
*/
@Output() prev = new EventEmitter<boolean>();
/**
* If showPaginator is set to true, emit when the next button is clicked
*/
@Output() next = new EventEmitter<boolean>();
/**
* The current listable objects
*/
@@ -192,4 +207,18 @@ export class ObjectListComponent {
onPaginationChange(event) {
this.paginationChange.emit(event);
}
/**
* Go to the previous page
*/
goPrev() {
this.prev.emit(true);
}
/**
* Go to the next page
*/
goNext() {
this.next.emit(true);
}
}