From 9f54755a2222743510dddfccc073c57506ba4665 Mon Sep 17 00:00:00 2001 From: Aleksandr Lushkin Date: Thu, 7 Mar 2024 12:30:10 +0100 Subject: [PATCH] Client: Fix infinite loading after clicking on sort arrow --- .../Groups/TableView/GroupsTableHeader.js | 13 ------------- .../InsideGroup/TableView/TableHeader.js | 13 ------------- .../AccountsBody/People/TableView/TableHeader.js | 13 ------------- 3 files changed, 39 deletions(-) diff --git a/packages/client/src/pages/Home/Section/AccountsBody/Groups/TableView/GroupsTableHeader.js b/packages/client/src/pages/Home/Section/AccountsBody/Groups/TableView/GroupsTableHeader.js index ccf168b948..c2e6724a15 100644 --- a/packages/client/src/pages/Home/Section/AccountsBody/Groups/TableView/GroupsTableHeader.js +++ b/packages/client/src/pages/Home/Section/AccountsBody/Groups/TableView/GroupsTableHeader.js @@ -22,7 +22,6 @@ class GroupsTableHeader extends React.Component { sortBy: "title", minWidth: 210, onClick: this.onFilter, - onIconClick: this.onIconClick, }, { key: "Head of Group", @@ -78,18 +77,6 @@ class GroupsTableHeader extends React.Component { navigate(`${location.pathname}?${newFilter.toUrlParams()}`); }; - onIconClick = () => { - const { filter, setIsLoading, navigate, location } = this.props; - const newFilter = filter.clone(); - - newFilter.sortOrder = - newFilter.sortOrder === "ascending" ? "descending" : "ascending"; - - setIsLoading(true); - - navigate(`${location.pathname}?${newFilter.toUrlParams()}`); - }; - render() { const { columns } = this.state; const { diff --git a/packages/client/src/pages/Home/Section/AccountsBody/InsideGroup/TableView/TableHeader.js b/packages/client/src/pages/Home/Section/AccountsBody/InsideGroup/TableView/TableHeader.js index 00895baadf..962e0e3253 100644 --- a/packages/client/src/pages/Home/Section/AccountsBody/InsideGroup/TableView/TableHeader.js +++ b/packages/client/src/pages/Home/Section/AccountsBody/InsideGroup/TableView/TableHeader.js @@ -24,7 +24,6 @@ class InsideGroupTableHeader extends React.Component { sortBy: "AZ", minWidth: 210, onClick: this.onFilter, - onIconClick: this.onIconClick, }, { key: "Type", @@ -117,18 +116,6 @@ class InsideGroupTableHeader extends React.Component { navigate(`${location.pathname}?${newFilter.toUrlParams()}`); }; - onIconClick = () => { - const { filter, setIsLoading, navigate, location } = this.props; - const newFilter = filter.clone(); - - newFilter.sortOrder = - newFilter.sortOrder === "ascending" ? "descending" : "ascending"; - - setIsLoading(true); - - navigate(`${location.pathname}?${newFilter.toUrlParams()}`); - }; - render() { const { columns } = this.state; const { diff --git a/packages/client/src/pages/Home/Section/AccountsBody/People/TableView/TableHeader.js b/packages/client/src/pages/Home/Section/AccountsBody/People/TableView/TableHeader.js index 94f71f9c3b..c6c85c0aa8 100644 --- a/packages/client/src/pages/Home/Section/AccountsBody/People/TableView/TableHeader.js +++ b/packages/client/src/pages/Home/Section/AccountsBody/People/TableView/TableHeader.js @@ -27,7 +27,6 @@ class PeopleTableHeader extends React.Component { sortBy: "AZ", minWidth: 210, onClick: this.onFilter, - onIconClick: this.onIconClick, }, { key: "Type", @@ -132,18 +131,6 @@ class PeopleTableHeader extends React.Component { navigate(`${location.pathname}?${newFilter.toUrlParams()}`); }; - onIconClick = () => { - const { filter, setIsLoading, navigate, location } = this.props; - const newFilter = filter.clone(); - - newFilter.sortOrder = - newFilter.sortOrder === "ascending" ? "descending" : "ascending"; - - setIsLoading(true); - - navigate(`${location.pathname}?${newFilter.toUrlParams()}`); - }; - render() { const { columns } = this.state; const {