Skeleton Fixes (#8845)

This commit is contained in:
Gerard Burns 2022-12-02 09:24:05 +00:00 committed by GitHub
parent 9c923c7f8c
commit 6e4f560948
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,11 +74,9 @@
enrichRelationships: true,
})
}
schemaLoaded = true
}
</script>
{#if schemaLoaded}
<Block>
<BlockComponent
type="form"
@ -209,4 +206,3 @@
</BlockComponent>
</BlockComponent>
</Block>
{/if}

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,7 +111,6 @@
}
</script>
{#if schemaLoaded}
<Block>
<BlockComponent
type="form"
@ -271,4 +268,3 @@
{/if}
</BlockComponent>
</Block>
{/if}

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,7 +66,6 @@
)
</script>
{#if loaded}
{#key resetKey}
<InnerForm
{dataSource}
@ -87,4 +82,3 @@
<slot />
</InnerForm>
{/key}
{/if}