Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 39d08578 authored by Joze RIHTARSIC's avatar Joze RIHTARSIC
Browse files

[EDELIVERY-13775] UI Wrong page after delete AccessToken/Certificate

parent 7ec16c73
No related branches found
No related tags found
No related merge requests found
Pipeline #208343 failed
......@@ -68,9 +68,12 @@ export class UserAccessTokensComponent implements AfterViewInit, BeforeLeaveGuar
userAccessToken];
}
// show current page after update if possible or previous page
let pageIndex = Math.min(this.paginator.pageIndex,
Math.floor(this.accessTokens.length / this.paginator.pageSize));
// set the data source
this.dataSource.data = this.accessTokens;
// show the last page
this.paginator.lastPage();
this.paginator.pageIndex = pageIndex;
}
public trackListItem(index: number, credential: CredentialRo) {
......
......@@ -73,8 +73,13 @@ export class UserCertificatesComponent implements AfterViewInit, BeforeLeaveGuar
certificate];
}
// show current page after update if possible or previous page
let pageIndex = Math.min(this.paginator.pageIndex,
Math.floor(this.certificates.length / this.paginator.pageSize));
// set data
this.dataSource.data = this.certificates;
// show the last page
// set page
this.paginator.pageIndex = pageIndex;
this.paginator.lastPage();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment