A local-first personal finance app
:bug: changing pages while adding a transaction (#1305)
Matiss Janis Aboltinscc497b29ab6e
diff --git a/packages/desktop-client/src/components/accounts/Account.js b/packages/desktop-client/src/components/accounts/Account.jsindex d67b3cb3c8..cc7b163736 100644--- a/packages/desktop-client/src/components/accounts/Account.js+++ b/packages/desktop-client/src/components/accounts/Account.js@@ -216,6 +216,11 @@ class AccountInternal extends PureComponent {}componentDidUpdate(prevProps) {+ // If the active account changes - close the transaction entry mode+ if (this.state.isAdding && this.props.accountId !== prevProps.accountId) {+ this.setState({ isAdding: false });+ }+// If the user was on a different screen and is now coming back to// the transactions, automatically refresh the transaction to make// sure we have updated statediff --git a/upcoming-release-notes/1305.md b/upcoming-release-notes/1305.mdnew file mode 100644index 0000000000..23d1760dba--- /dev/null+++ b/upcoming-release-notes/1305.md@@ -0,0 +1,6 @@+---+category: Bugfix+authors: [MatissJanis]+---++Close the "add transaction" entry mode when switching between accounts