Skip to content

Commit

Permalink
🐛 (import) fix csv import checkboxes not working (actualbudget#3478)
Browse files Browse the repository at this point in the history
  • Loading branch information
MatissJanis authored and a-gradina committed Sep 24, 2024
1 parent 3e8ff79 commit 8fc22bd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,6 @@ export function ImportTransactionsModal({ options }) {
const [flipAmount, setFlipAmount] = useState(false);
const [multiplierEnabled, setMultiplierEnabled] = useState(false);
const [reconcile, setReconcile] = useState(true);
const [previewTrigger, setPreviewTrigger] = useState(0);
const { accountId, categories, onImported } = options;

// This cannot be set after parsing the file, because changing it
Expand Down Expand Up @@ -1368,7 +1367,7 @@ export function ImportTransactionsModal({ options }) {
close();
}

const runImportPreviewCallback = useCallback(async () => {
const runImportPreview = useCallback(async () => {
const transactionPreview = await getImportPreview(
transactions,
filetype,
Expand Down Expand Up @@ -1397,14 +1396,6 @@ export function ImportTransactionsModal({ options }) {
multiplierAmount,
]);

useEffect(() => {
runImportPreviewCallback();
}, [previewTrigger, runImportPreviewCallback]);

function runImportPreview() {
setPreviewTrigger(value => value + 1);
}

const headers = [
{ name: 'Date', width: 200 },
{ name: 'Payee', width: 'flex' },
Expand Down
6 changes: 6 additions & 0 deletions upcoming-release-notes/3478.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [MatissJanis]
---

CSV import - fix checkboxes not working.

0 comments on commit 8fc22bd

Please sign in to comment.