form view

This commit is contained in:
Jan Prochazka
2021-03-21 08:16:15 +01:00
parent 10c77ad153
commit 5ebee161ae
6 changed files with 194 additions and 45 deletions

View File

@@ -27,6 +27,7 @@
export let formDisplay;
export let changeSetState;
export let dispatchChangeSet;
export let masterLoadedTime;
let isLoadingData = false;
let isLoadedData = false;
@@ -39,6 +40,7 @@
let errorMessage = null;
const handleLoadCurrentRow = async () => {
console.log('LOAD ROW');
if (isLoadingData) return;
let newLoadedRow = false;
if (formDisplay.config.formViewKeyRequested || formDisplay.config.formViewKey) {
@@ -96,6 +98,18 @@
errorMessage = null;
}
$: {
if (masterLoadedTime && masterLoadedTime > loadedTime) {
formDisplay.reload();
}
}
$: {
if (formDisplay.cache.refreshTime > loadedTime) {
reload();
}
}
$: {
if (formDisplay.isLoadedCorrectly) {
if (!isLoadedData && !isLoadingData) handleLoadCurrentRow();