Skip to content

Commit

Permalink
Don't scroll main view to top after adding or deleting a transaction
Browse files Browse the repository at this point in the history
This was implemented assuming an added transaction would likely appear
at the top but just keeping the scroll position is probably the better
option. There are also cases where the user checks if a certain
has been already added and if not, adds it, which then appears right at
the original scroll position.

fixes #205
  • Loading branch information
xMartin committed May 31, 2023
1 parent 4b88f0c commit faa8a53
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/redux/actioncreators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -515,10 +515,6 @@ export const addOrUpdateTransaction =

dispatch(createCreateOrUpdateTransactionAction(transaction));

// if create, scroll main to top, assuming a transaction was added to the top
if (!transactionId) {
resetMainContentScrollPosition();
}
dispatch(selectTab(tabId));

resetTransactionFormDelayed(dispatch);
Expand Down Expand Up @@ -546,7 +542,6 @@ export const removeTransaction =

dispatch(createRemoveTransactionAction(doc));

resetMainContentScrollPosition();
const tabId = state.location.payload.tabId;
dispatch(selectTab(tabId));

Expand Down

0 comments on commit faa8a53

Please sign in to comment.