Skip to content
Snippets Groups Projects
Unverified Commit 3110cab0 authored by Matiss Janis Aboltins's avatar Matiss Janis Aboltins
Browse files

prune: remove more scrollTo code

parent 4236b321
No related branches found
No related tags found
No related merge requests found
...@@ -74,24 +74,16 @@ export default function TransactionList({ ...@@ -74,24 +74,16 @@ export default function TransactionList({
renderEmpty, renderEmpty,
onChange, onChange,
onRefetch, onRefetch,
onRefetchUpToRow,
onCloseAddTransaction, onCloseAddTransaction,
onCreatePayee onCreatePayee
}) { }) {
let transactionsLatest = useRef(); let transactionsLatest = useRef();
let scrollTo = useRef();
let history = useHistory(); let history = useHistory();
useEffect(clearScrollTo);
useLayoutEffect(() => { useLayoutEffect(() => {
transactionsLatest.current = transactions; transactionsLatest.current = transactions;
}, [transactions]); }, [transactions]);
function clearScrollTo() {
scrollTo.current = null;
}
let onAdd = useCallback(async newTransactions => { let onAdd = useCallback(async newTransactions => {
newTransactions = realizeTempTransactions(newTransactions); newTransactions = realizeTempTransactions(newTransactions);
...@@ -186,7 +178,6 @@ export default function TransactionList({ ...@@ -186,7 +178,6 @@ export default function TransactionList({
onAddSplit={onAddSplit} onAddSplit={onAddSplit}
onManagePayees={onManagePayees} onManagePayees={onManagePayees}
onCreatePayee={onCreatePayee} onCreatePayee={onCreatePayee}
onScroll={clearScrollTo}
style={{ backgroundColor: 'white' }} style={{ backgroundColor: 'white' }}
/> />
); );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment