form view works for JSL data

This commit is contained in:
Jan Prochazka
2023-01-22 19:27:39 +01:00
parent f014a4e6b4
commit ef62948b5a
4 changed files with 11 additions and 3 deletions

View File

@@ -198,6 +198,7 @@
export let isLoading;
export let grider;
export let display;
export let rowCountNotAvailable;
// export let formDisplay;
export let onNavigate;
@@ -222,9 +223,12 @@
$: columnChunks = _.chunk(display?.formColumns || [], rowCount) as any[][];
$: rowCountInfo = getRowCountInfo(allRowCount);
$: rowCountInfo = getRowCountInfo(allRowCount, display);
function getRowCountInfo(allRowCount) {
if (rowCountNotAvailable) {
return `Row: ${((display.config.formViewRecordNumber || 0) + 1).toLocaleString()} / ???`;
}
if (rowData == null) {
if (allRowCount != null) {
return `Out of bounds: ${(

View File

@@ -11,7 +11,7 @@
});
if (response.errorMessage) return response;
return response.rows[0];
return response[0];
}
</script>
@@ -31,4 +31,4 @@
}
</script>
<LoadingFormView {...$$props} loadRowFunc={handleLoadRow} loadRowCountFunc={handleLoadRowCount} />
<LoadingFormView {...$$props} loadRowFunc={handleLoadRow} loadRowCountFunc={handleLoadRowCount} rowCountNotAvailable />