From d9e4ef651c39c08326ead55054e6d15191d20f82 Mon Sep 17 00:00:00 2001 From: Roman Hergenreder Date: Thu, 18 Jun 2020 15:46:15 +0200 Subject: [PATCH] Don't refresh current page --- src/src/views/users.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/src/views/users.js b/src/src/views/users.js index 595b7fd..f94454d 100644 --- a/src/src/views/users.js +++ b/src/src/views/users.js @@ -158,8 +158,7 @@ export default class UserOverview extends React.Component { if (user.groups.hasOwnProperty(groupId)) { let groupName = user.groups[groupId]; let color = (groupId === "1" ? "danger" : "secondary"); - groups.push({groupName}); + groups.push({groupName}); } } @@ -181,7 +180,7 @@ export default class UserOverview extends React.Component { let active = (this.state.users.page === i ? " active" : ""); pages.push(
  • - this.fetchUsers(i)}> + { if (this.state.users.page !== i) this.fetchUsers(i) }}> {i}
  • @@ -265,7 +264,7 @@ export default class UserOverview extends React.Component { let active = (this.state.groups.page === i ? " active" : ""); pages.push(
  • - this.fetchGroups(i)}> + { if (this.state.groups.page !== i) this.fetchGroups(i) }}> {i}