Skip to content

Commit

Permalink
🐛 (transactions) create transaction when clicking enter (#992)
Browse files Browse the repository at this point in the history
Closes #943

Creates the transaction when clicking "enter". Irrelevant of which field
is currently active.
  • Loading branch information
MatissJanis authored May 4, 2023
1 parent d218590 commit 539cb0e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1619,9 +1619,6 @@ export let TransactionTable = React.forwardRef((props, ref) => {
// add split
onAddSplit(lastTransaction.id);
} else if (
(newNavigator.focusedField === 'debit' ||
newNavigator.focusedField === 'credit' ||
newNavigator.focusedField === 'cleared') &&
newNavigator.editingId === lastTransaction.id &&
(!isSplit || !lastTransaction.error)
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ describe('Transactions', () => {

input = await editNewField(container, 'notes');
await userEvent.clear(input);
await userEvent.type(input, 'a transaction[Enter]');
await userEvent.type(input, 'a transaction');

input = await editNewField(container, 'debit');
expect(input.value).toBe('0.00');
Expand Down
6 changes: 6 additions & 0 deletions upcoming-release-notes/992.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [MatissJanis]
---

Allow creating transactions by clicking "enter" in the notes/payee/category field

0 comments on commit 539cb0e

Please sign in to comment.