fix: don't pre-select already-imported files when entering source config

selectSource had an empty dependency array, causing a stale closure
where importedFilesBySource was always the initial empty Map. This
made the new-file filter select all files including imported ones.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Le-King-Fu 2026-02-15 13:21:11 +00:00
parent ac295d9048
commit 172be36f1d

View file

@ -363,7 +363,7 @@ export function useImportWizard() {
dispatch({ type: "SET_STEP", payload: "source-config" });
},
[] // eslint-disable-line react-hooks/exhaustive-deps
[state.importedFilesBySource] // eslint-disable-line react-hooks/exhaustive-deps
);
const loadHeadersWithConfig = useCallback(