From c12bdd09eb2a1fb98043b912917443b20fb35fdb Mon Sep 17 00:00:00 2001 From: carkom Date: Fri, 28 Jul 2023 10:48:57 +0100 Subject: [PATCH 1/5] Add missing lines --- packages/desktop-client/src/components/accounts/Account.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/desktop-client/src/components/accounts/Account.js b/packages/desktop-client/src/components/accounts/Account.js index d9526f8f468..685809d5160 100644 --- a/packages/desktop-client/src/components/accounts/Account.js +++ b/packages/desktop-client/src/components/accounts/Account.js @@ -1297,6 +1297,9 @@ class AccountInternal extends PureComponent { ) : null } + onSort={this.onSort} + sortField={this.state.sort.field} + ascDesc={this.state.sort.ascDesc} onChange={this.onTransactionsChange} onRefetch={this.refetchTransactions} onRefetchUpToRow={row => From 88812a98928b4e26c08d172fb70376b197020a50 Mon Sep 17 00:00:00 2001 From: carkom Date: Fri, 28 Jul 2023 10:52:44 +0100 Subject: [PATCH 2/5] notes --- upcoming-release-notes/1406.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 upcoming-release-notes/1406.md diff --git a/upcoming-release-notes/1406.md b/upcoming-release-notes/1406.md new file mode 100644 index 00000000000..c295b978a2e --- /dev/null +++ b/upcoming-release-notes/1406.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [carkom] +--- + +Fix missed lines from previous merge that broke sorting. \ No newline at end of file From fdad15dfea9ffc2058274c32bb7b57885e8e3f3c Mon Sep 17 00:00:00 2001 From: carkom Date: Fri, 28 Jul 2023 11:56:35 +0100 Subject: [PATCH 3/5] Clear sort menu item/filter-sorting interactions --- .../desktop-client/src/components/accounts/Account.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/desktop-client/src/components/accounts/Account.js b/packages/desktop-client/src/components/accounts/Account.js index 685809d5160..d3825069a4c 100644 --- a/packages/desktop-client/src/components/accounts/Account.js +++ b/packages/desktop-client/src/components/accounts/Account.js @@ -1047,13 +1047,13 @@ class AccountInternal extends PureComponent { }, () => { this.fetchTransactions(); - - if (this.state.sort.length !== 0) { - this.applySort(); - } }, ); } + + if (this.state.sort.length !== 0) { + this.applySort(); + } }; applySort = (field, ascDesc, prevField, prevAscDesc) => { @@ -1217,6 +1217,7 @@ class AccountInternal extends PureComponent { showEmptyMessage={showEmptyMessage} balanceQuery={balanceQuery} canCalculateBalance={this.canCalculateBalance} + isSorted={this.state.sort.length !== 0} reconcileAmount={reconcileAmount} search={this.state.search} filters={this.state.filters} From d3e5362d83b6454be6d09ba86ece33e3d41e9a63 Mon Sep 17 00:00:00 2001 From: carkom Date: Fri, 28 Jul 2023 12:36:13 +0100 Subject: [PATCH 4/5] Change show/hide balance on transactionlist --- packages/desktop-client/src/components/accounts/Account.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/desktop-client/src/components/accounts/Account.js b/packages/desktop-client/src/components/accounts/Account.js index d3825069a4c..3d646d65854 100644 --- a/packages/desktop-client/src/components/accounts/Account.js +++ b/packages/desktop-client/src/components/accounts/Account.js @@ -1266,7 +1266,7 @@ class AccountInternal extends PureComponent { categoryGroups={categoryGroups} payees={payees} balances={allBalances} - showBalances={showBalances} + showBalances={!!allBalances} showCleared={showCleared} showAccount={ !accountId || From 1174bbf86728e807d655d2c8b9793767297ed19b Mon Sep 17 00:00:00 2001 From: carkom Date: Fri, 28 Jul 2023 12:56:12 +0100 Subject: [PATCH 5/5] Fix Header alignment --- .../src/components/transactions/TransactionsTable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/desktop-client/src/components/transactions/TransactionsTable.js b/packages/desktop-client/src/components/transactions/TransactionsTable.js index 5664a95077d..23e84f06e3a 100644 --- a/packages/desktop-client/src/components/transactions/TransactionsTable.js +++ b/packages/desktop-client/src/components/transactions/TransactionsTable.js @@ -363,7 +363,7 @@ const TransactionHeader = memo( } /> {showBalance && } - {showCleared && } + {showCleared && } );