mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Recalculate field map after delimeter changes
https://forums.ankiweb.net/t/anki-2-1-54-release-candidate/20861/8
This commit is contained in:
parent
bc5633e070
commit
30c6bd58c9
1 changed files with 3 additions and 1 deletions
|
@ -49,6 +49,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
|
|
||||||
let dupeResolution: ImportExport.ImportCsvRequest.DupeResolution;
|
let dupeResolution: ImportExport.ImportCsvRequest.DupeResolution;
|
||||||
let lastNotetypeId = globalNotetype?.id;
|
let lastNotetypeId = globalNotetype?.id;
|
||||||
|
let lastDelimeter = delimiter;
|
||||||
|
|
||||||
$: columnOptions = getColumnOptions(
|
$: columnOptions = getColumnOptions(
|
||||||
columnLabels,
|
columnLabels,
|
||||||
|
@ -62,8 +63,9 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
columnLabels = meta.columnLabels;
|
columnLabels = meta.columnLabels;
|
||||||
preview = meta.preview;
|
preview = meta.preview;
|
||||||
});
|
});
|
||||||
$: if (globalNotetype?.id !== lastNotetypeId) {
|
$: if (globalNotetype?.id !== lastNotetypeId || delimiter !== lastDelimeter) {
|
||||||
lastNotetypeId = globalNotetype?.id;
|
lastNotetypeId = globalNotetype?.id;
|
||||||
|
lastDelimeter = delimiter;
|
||||||
getCsvMetadata(path, delimiter, globalNotetype?.id).then((meta) => {
|
getCsvMetadata(path, delimiter, globalNotetype?.id).then((meta) => {
|
||||||
globalNotetype = meta.globalNotetype ?? null;
|
globalNotetype = meta.globalNotetype ?? null;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue