From d0a634a26fbe8e8a7c44dfb65f3e8edfcf519ce4 Mon Sep 17 00:00:00 2001 From: Michael An <2331806369@qq.com> Date: Fri, 27 Sep 2024 16:19:38 +0800 Subject: [PATCH] fix search user in system admin page (#6860) * fix search user in system admin page * optimise codes --- frontend/src/pages/sys-admin/users/search-users.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/frontend/src/pages/sys-admin/users/search-users.js b/frontend/src/pages/sys-admin/users/search-users.js index 35adaeae58..676e5cc73b 100644 --- a/frontend/src/pages/sys-admin/users/search-users.js +++ b/frontend/src/pages/sys-admin/users/search-users.js @@ -42,7 +42,9 @@ class SearchUsers extends Component { query: params.get('query') || '', currentPage: parseInt(params.get('page') || currentPage), perPage: parseInt(params.get('per_page') || perPage) - }, () => {this.getItems(this.state.currentPage);}); + }, () => { + this.getItems(this.state.currentPage); + }); } toggleBatchSetQuotaDialog = () => { @@ -276,7 +278,7 @@ class SearchUsers extends Component { if (e.keyCode === 13) { const { isSubmitBtnActive } = this.state; if (isSubmitBtnActive) { - this.getItems(); + this.getItems(1); } } }; @@ -315,7 +317,12 @@ class SearchUsers extends Component { - + @@ -329,6 +336,7 @@ class SearchUsers extends Component { loading={this.state.loading} errorMsg={this.state.errorMsg} items={this.state.userList} + curPerPage={this.state.perPage} updateUser={this.updateUser} deleteUser={this.deleteUser} updateAdminRole={this.updateAdminRole}