Skip to content

A local-first personal finance app

:bug: (import) fix csv import checkboxes not working (#3478)

Matiss Janis Aboltins6354598d48a4
diff --git a/packages/desktop-client/src/components/modals/ImportTransactionsModal.jsx b/packages/desktop-client/src/components/modals/ImportTransactionsModal.jsx
index feaf188bff..3d0d5dca5e 100644
--- a/packages/desktop-client/src/components/modals/ImportTransactionsModal.jsx
+++ b/packages/desktop-client/src/components/modals/ImportTransactionsModal.jsx
@@ -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
@@ -1368,7 +1367,7 @@ export function ImportTransactionsModal({ options }) {
close();
}
- const runImportPreviewCallback = useCallback(async () => {
+ const runImportPreview = useCallback(async () => {
const transactionPreview = await getImportPreview(
transactions,
filetype,
@@ -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' },
diff --git a/upcoming-release-notes/3478.md b/upcoming-release-notes/3478.md
new file mode 100644
index 0000000000..fb85dc1d51
--- /dev/null
+++ b/upcoming-release-notes/3478.md
@@ -0,0 +1,6 @@
+---
+category: Bugfix
+authors: [MatissJanis]
+---
+
+CSV import - fix checkboxes not working.