save structure changes to jsonl file

This commit is contained in:
Jan Prochazka
2023-02-16 13:33:28 +01:00
parent edf0637a35
commit 3114a05c3b
4 changed files with 65 additions and 4 deletions

View File

@@ -18,11 +18,12 @@
export let dispatchChangeSet = null;
export let allowChangeChangeSetStructure = false;
export let infoLoadCounter = 0;
let loadedRows;
let infoCounter = 0;
$: info = useApiCall('jsldata/get-info', { jslid, infoCounter }, {});
$: info = useApiCall('jsldata/get-info', { jslid, infoCounter, infoLoadCounter }, {});
// $: columns = ($info && $info.columns) || [];
const config = writable(createGridConfig());

View File

@@ -42,6 +42,7 @@
export let jslid = undefined;
export let tabid;
let infoLoadCounter = 0;
const quickExportHandlerRef = createQuickExportHandlerRef();
@@ -73,7 +74,11 @@
file: archiveFile,
changeSet: $changeSetStore.value,
});
const structureChanged = !!$changeSetStore.value?.structure;
dispatchChangeSet({ type: 'reset', value: createChangeSet() });
if (structureChanged) {
infoLoadCounter += 1;
}
await tick();
runCommand('dataGrid.refresh');
}
@@ -92,6 +97,7 @@
focusOnVisible
{changeSetStore}
{dispatchChangeSet}
{infoLoadCounter}
/>
<svelte:fragment slot="toolstrip">
<ToolStripCommandButton command="dataGrid.refresh" />