diff --git a/packages/desktop-client/src/components/accounts/Account.js b/packages/desktop-client/src/components/accounts/Account.js index d9526f8f468509fb149ff0c159fbd23d1e802998..3d646d65854bce65136d4bdad06cfd40efac51e1 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} @@ -1265,7 +1266,7 @@ class AccountInternal extends PureComponent { categoryGroups={categoryGroups} payees={payees} balances={allBalances} - showBalances={showBalances} + showBalances={!!allBalances} showCleared={showCleared} showAccount={ !accountId || @@ -1297,6 +1298,9 @@ class AccountInternal extends PureComponent { </View> ) : null } + onSort={this.onSort} + sortField={this.state.sort.field} + ascDesc={this.state.sort.ascDesc} onChange={this.onTransactionsChange} onRefetch={this.refetchTransactions} onRefetchUpToRow={row => diff --git a/packages/desktop-client/src/components/transactions/TransactionsTable.js b/packages/desktop-client/src/components/transactions/TransactionsTable.js index 5664a95077d897a82c8f1fd0525b4ae03c2656c8..23e84f06e3a8de41ae3445f01a859b62d18554a8 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 && <Cell value="Balance" width={88} textAlign="right" />} - {showCleared && <Field width={30} truncate={false} />} + {showCleared && <Field width={23} truncate={false} />} <Cell value="" width={5 + scrollWidth ?? 0} /> </Row> ); diff --git a/upcoming-release-notes/1406.md b/upcoming-release-notes/1406.md new file mode 100644 index 0000000000000000000000000000000000000000..c295b978a2e840fc04ac43b402a6569ae1fd38ff --- /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