Skeleton Fixes (#8845)

This commit is contained in:
Gerard Burns 2022-12-02 09:24:05 +00:00 committed by GitHub
parent 8fab962e38
commit 66a00a677a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 265 additions and 278 deletions

View File

@ -479,6 +479,7 @@
definition.name !== "Screenslot" &&
children.length === 0 &&
!instance._blockElementHasChildren &&
!definition.block &&
definition.skeleton !== false
</script>

View File

@ -36,7 +36,6 @@
let dataProviderId
let repeaterId
let schema
let schemaLoaded = false
$: fetchSchema(dataSource)
$: enrichedSearchColumns = enrichSearchColumns(searchColumns, schema)
@ -75,12 +74,10 @@
enrichRelationships: true,
})
}
schemaLoaded = true
}
</script>
{#if schemaLoaded}
<Block>
<Block>
<BlockComponent
type="form"
bind:id={formId}
@ -208,5 +205,4 @@
</BlockComponent>
</BlockComponent>
</BlockComponent>
</Block>
{/if}
</Block>

View File

@ -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,8 +111,7 @@
}
</script>
{#if schemaLoaded}
<Block>
<Block>
<BlockComponent
type="form"
bind:id={formId}
@ -270,5 +267,4 @@
</BlockComponent>
{/if}
</BlockComponent>
</Block>
{/if}
</Block>

View File

@ -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,8 +66,7 @@
)
</script>
{#if loaded}
{#key resetKey}
{#key resetKey}
<InnerForm
{dataSource}
{theme}
@ -86,5 +81,4 @@
>
<slot />
</InnerForm>
{/key}
{/if}
{/key}