diff --git a/packages/client/src/components/Component.svelte b/packages/client/src/components/Component.svelte index e5fe100372..aa03b3ce8a 100644 --- a/packages/client/src/components/Component.svelte +++ b/packages/client/src/components/Component.svelte @@ -479,6 +479,7 @@ definition.name !== "Screenslot" && children.length === 0 && !instance._blockElementHasChildren && + !definition.block && definition.skeleton !== false diff --git a/packages/client/src/components/app/blocks/CardsBlock.svelte b/packages/client/src/components/app/blocks/CardsBlock.svelte index 9c110d7097..5098a3acf4 100644 --- a/packages/client/src/components/app/blocks/CardsBlock.svelte +++ b/packages/client/src/components/app/blocks/CardsBlock.svelte @@ -36,7 +36,6 @@ let dataProviderId let repeaterId let schema - let schemaLoaded = false $: fetchSchema(dataSource) $: enrichedSearchColumns = enrichSearchColumns(searchColumns, schema) @@ -75,138 +74,135 @@ enrichRelationships: true, }) } - schemaLoaded = true } -{#if schemaLoaded} - - - {#if title || enrichedSearchColumns?.length || showTitleButton} + + + {#if title || enrichedSearchColumns?.length || showTitleButton} + + + {#if enrichedSearchColumns?.length} + {#each enrichedSearchColumns as column, idx} + + {/each} + {/if} + {#if showTitleButton} + + {/if} + + + {/if} + + + - - - {#if enrichedSearchColumns?.length} - {#each enrichedSearchColumns as column, idx} - - {/each} - {/if} - {#if showTitleButton} - - {/if} - - - {/if} - - - - + /> - -{/if} + + diff --git a/packages/client/src/components/app/blocks/TableBlock.svelte b/packages/client/src/components/app/blocks/TableBlock.svelte index 9df81635db..40f0eebebb 100644 --- a/packages/client/src/components/app/blocks/TableBlock.svelte +++ b/packages/client/src/components/app/blocks/TableBlock.svelte @@ -36,7 +36,6 @@ let newRowSidePanelId let schema let primaryDisplay - let schemaLoaded = false $: fetchSchema(dataSource) $: enrichedSearchColumns = enrichSearchColumns(searchColumns, schema) @@ -89,7 +88,6 @@ enrichRelationships: true, }) } - schemaLoaded = true } const getNormalFields = schema => { @@ -113,162 +111,160 @@ } -{#if schemaLoaded} - - - {#if title || enrichedSearchColumns?.length || showTitleButton} + + + {#if title || enrichedSearchColumns?.length || showTitleButton} + + - - - {#if enrichedSearchColumns?.length} - {#each enrichedSearchColumns as column, idx} - - {/each} - {/if} - {#if showTitleButton} + {#if enrichedSearchColumns?.length} + {#each enrichedSearchColumns as column, idx} - {/if} - + {/each} + {/if} + {#if showTitleButton} + + {/if} - {/if} + + {/if} + + + {#if clickBehaviour === "details"} + - {#if clickBehaviour === "details"} + {/if} + {#if showTitleButton && titleButtonClickBehaviour === "new"} + - - - {/if} - {#if showTitleButton && titleButtonClickBehaviour === "new"} - - - - {/if} - - -{/if} + name="New row form block" + type="formblock" + props={{ + dataSource, + showSaveButton: true, + showDeleteButton: false, + actionType: "Create", + fields: normalFields, + title: "Create Row", + labelPosition: "left", + }} + /> + + {/if} + + diff --git a/packages/client/src/components/app/forms/Form.svelte b/packages/client/src/components/app/forms/Form.svelte index 8950661bd8..e2a6dcf7c5 100644 --- a/packages/client/src/components/app/forms/Form.svelte +++ b/packages/client/src/components/app/forms/Form.svelte @@ -20,7 +20,6 @@ const context = getContext("context") const { API, fetchDatasourceSchema } = getContext("sdk") - let loaded = false let schema let table @@ -49,9 +48,6 @@ // Fetches the form schema from this form's dataSource const fetchSchema = async dataSource => { schema = (await fetchDatasourceSchema(dataSource)) || {} - if (!loaded) { - loaded = true - } } const fetchTable = async dataSource => { @@ -70,21 +66,19 @@ ) -{#if loaded} - {#key resetKey} - - - - {/key} -{/if} +{#key resetKey} + + + +{/key}