Skip to content

Commit

Permalink
Fix: Go to page one of the table when 'show inactive projects' is cli…
Browse files Browse the repository at this point in the history
…cked

Signed-off-by: Enora Germond <enora.germond@deveryware.com>
  • Loading branch information
Enora Germond committed Mar 27, 2023
1 parent 9040d85 commit c0c5648
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/views/portfolio/projects/ProjectList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@
refreshTable: function () {
this.$refs.table.refresh({
url: this.apiUrl(),
silent: true
silent: true,
pageNumber: this.currentPage
});
},
onLoadSuccess: function () {
Expand Down Expand Up @@ -143,7 +144,8 @@
if (localStorage) {
localStorage.setItem("ProjectListShowInactiveProjects", this.showInactiveProjects.toString());
}
this.$refs.table.showLoading()
this.$refs.table.showLoading();
this.currentPage = 1;
this.refreshTable();
},
showFlatView() {
Expand Down Expand Up @@ -277,6 +279,7 @@
sidePagination: 'server',
queryParamsType: 'pageSize',
pageList: '[10, 25, 50, 100]',
currentPage: 1,
pageSize: (localStorage && localStorage.getItem("ProjectListPageSize") !== null) ? Number(localStorage.getItem("ProjectListPageSize")) : 10,
sortName: (localStorage && localStorage.getItem("ProjectListSortName") !== null) ? localStorage.getItem("ProjectListSortName") : undefined,
sortOrder: (localStorage && localStorage.getItem("ProjectListSortOrder") !== null) ? localStorage.getItem("ProjectListSortOrder") : undefined,
Expand Down Expand Up @@ -323,6 +326,7 @@
if (localStorage) {
localStorage.setItem("ProjectListPageSize", size.toString());
}
this.currentPage = number;
}),
onColumnSwitch: ((field, checked) => {
if (localStorage) {
Expand Down

0 comments on commit c0c5648

Please sign in to comment.