[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

@@ -88,6 +88,11 @@ export class ObjectCollectionComponent implements OnInit {
*/
@Input() hidePaginationDetail = false;
/**
* Whether or not the pagination should be rendered as simple previous and next buttons instead of the normal pagination
*/
@Input() showPaginator = true;
/**
* the page info of the list
*/
@@ -122,6 +127,16 @@ export class ObjectCollectionComponent implements OnInit {
*/
@Output() sortFieldChange: EventEmitter<string> = new EventEmitter<string>();
/**
* 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>();
/**
* Emits the current view mode
*/
@@ -192,4 +207,18 @@ export class ObjectCollectionComponent implements OnInit {
this.paginationChange.emit(event);
}
/**
* Go to the previous page
*/
goPrev() {
this.prev.emit(true);
}
/**
* Go to the next page
*/
goNext() {
this.next.emit(true);
}
}