mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-29 11:03:57 +00:00
form view works for JSL data
This commit is contained in:
@@ -48,5 +48,7 @@ export class JslGridDisplay extends GridDisplay {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!this.columns) this.columns = [];
|
if (!this.columns) this.columns = [];
|
||||||
|
|
||||||
|
this.formColumns = this.columns;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,6 +56,8 @@
|
|||||||
{...$$restProps}
|
{...$$restProps}
|
||||||
{display}
|
{display}
|
||||||
{jslid}
|
{jslid}
|
||||||
|
config={$config}
|
||||||
|
setConfig={config.update}
|
||||||
gridCoreComponent={JslDataGridCore}
|
gridCoreComponent={JslDataGridCore}
|
||||||
formViewComponent={JslFormView}
|
formViewComponent={JslFormView}
|
||||||
bind:loadedRows
|
bind:loadedRows
|
||||||
|
|||||||
@@ -198,6 +198,7 @@
|
|||||||
export let isLoading;
|
export let isLoading;
|
||||||
export let grider;
|
export let grider;
|
||||||
export let display;
|
export let display;
|
||||||
|
export let rowCountNotAvailable;
|
||||||
// export let formDisplay;
|
// export let formDisplay;
|
||||||
export let onNavigate;
|
export let onNavigate;
|
||||||
|
|
||||||
@@ -222,9 +223,12 @@
|
|||||||
|
|
||||||
$: columnChunks = _.chunk(display?.formColumns || [], rowCount) as any[][];
|
$: columnChunks = _.chunk(display?.formColumns || [], rowCount) as any[][];
|
||||||
|
|
||||||
$: rowCountInfo = getRowCountInfo(allRowCount);
|
$: rowCountInfo = getRowCountInfo(allRowCount, display);
|
||||||
|
|
||||||
function getRowCountInfo(allRowCount) {
|
function getRowCountInfo(allRowCount) {
|
||||||
|
if (rowCountNotAvailable) {
|
||||||
|
return `Row: ${((display.config.formViewRecordNumber || 0) + 1).toLocaleString()} / ???`;
|
||||||
|
}
|
||||||
if (rowData == null) {
|
if (rowData == null) {
|
||||||
if (allRowCount != null) {
|
if (allRowCount != null) {
|
||||||
return `Out of bounds: ${(
|
return `Out of bounds: ${(
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (response.errorMessage) return response;
|
if (response.errorMessage) return response;
|
||||||
return response.rows[0];
|
return response[0];
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -31,4 +31,4 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<LoadingFormView {...$$props} loadRowFunc={handleLoadRow} loadRowCountFunc={handleLoadRowCount} />
|
<LoadingFormView {...$$props} loadRowFunc={handleLoadRow} loadRowCountFunc={handleLoadRowCount} rowCountNotAvailable />
|
||||||
|
|||||||
Reference in New Issue
Block a user