Fix node channel list pagination
This commit is contained in:
@@ -19,7 +19,11 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<ngb-pagination *ngIf="response.channels.length > 0" class="pagination-container float-right" [size]="paginationSize" [collectionSize]="response.totalItems" [rotate]="true" [pageSize]="itemsPerPage" [(page)]="page" (pageChange)="pageChange(page)" [maxSize]="paginationMaxSize" [boundaryLinks]="true" [ellipses]="false"></ngb-pagination>
|
||||
<ngb-pagination *ngIf="response.channels.length > 0" class="pagination-container float-right"
|
||||
[size]="paginationSize" [collectionSize]="response.totalItems" [rotate]="true"
|
||||
[pageSize]="itemsPerPage" [(page)]="page" (pageChange)="pageChange(page)"
|
||||
[maxSize]="paginationMaxSize" [boundaryLinks]="true" [ellipses]="false">
|
||||
</ngb-pagination>
|
||||
|
||||
<table class="table table-borderless" *ngIf="response.channels.length === 0">
|
||||
<div class="d-flex justify-content-center" i18n="lightning.empty-channels-list">No channels to display</div>
|
||||
|
||||
@@ -47,7 +47,7 @@ export class ChannelsListComponent implements OnInit, OnChanges {
|
||||
}
|
||||
|
||||
ngOnChanges(): void {
|
||||
this.channelStatusForm.get('status').setValue(this.defaultStatus, { emitEvent: false });
|
||||
this.channelStatusForm.get('status').setValue(this.defaultStatus, { emitEvent: true });
|
||||
this.channelsPage$.next(1);
|
||||
|
||||
this.channels$ = merge(
|
||||
@@ -70,7 +70,7 @@ export class ChannelsListComponent implements OnInit, OnChanges {
|
||||
map((response) => {
|
||||
return {
|
||||
channels: response.body,
|
||||
totalItems: parseInt(response.headers.get('x-total-count'), 10) + 1
|
||||
totalItems: parseInt(response.headers.get('x-total-count'), 10)
|
||||
};
|
||||
}),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user