Merge pull request #8934 from Budibase/fix-skeleton-jank
Fix Skeleton Loader Jumping
This commit is contained in:
commit
93df5aaf33
|
@ -2598,6 +2598,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"passwordfield": {
|
"passwordfield": {
|
||||||
|
"skeleton": false,
|
||||||
"name": "Password Field",
|
"name": "Password Field",
|
||||||
"icon": "LockClosed",
|
"icon": "LockClosed",
|
||||||
"styles": [
|
"styles": [
|
||||||
|
@ -3066,6 +3067,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"longformfield": {
|
"longformfield": {
|
||||||
|
"skeleton": false,
|
||||||
"name": "Long Form Field",
|
"name": "Long Form Field",
|
||||||
"icon": "TextAlignLeft",
|
"icon": "TextAlignLeft",
|
||||||
"styles": [
|
"styles": [
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
const context = getContext("context")
|
const context = getContext("context")
|
||||||
const { API, fetchDatasourceSchema } = getContext("sdk")
|
const { API, fetchDatasourceSchema } = getContext("sdk")
|
||||||
|
|
||||||
let loaded = false
|
|
||||||
let schema
|
let schema
|
||||||
let table
|
let table
|
||||||
|
|
||||||
|
@ -56,32 +55,30 @@
|
||||||
}
|
}
|
||||||
const res = await fetchDatasourceSchema(dataSource)
|
const res = await fetchDatasourceSchema(dataSource)
|
||||||
schema = res || {}
|
schema = res || {}
|
||||||
if (!loaded) {
|
|
||||||
loaded = true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$: initialValues = getInitialValues(actionType, dataSource, $context)
|
$: initialValues = getInitialValues(actionType, dataSource, $context)
|
||||||
$: resetKey = Helpers.hashString(
|
$: resetKey = Helpers.hashString(
|
||||||
JSON.stringify(initialValues) + JSON.stringify(dataSource) + disabled
|
!!schema +
|
||||||
|
JSON.stringify(initialValues) +
|
||||||
|
JSON.stringify(dataSource) +
|
||||||
|
disabled
|
||||||
)
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if loaded}
|
{#key resetKey}
|
||||||
{#key resetKey}
|
<InnerForm
|
||||||
<InnerForm
|
{dataSource}
|
||||||
{dataSource}
|
{theme}
|
||||||
{theme}
|
{size}
|
||||||
{size}
|
{disabled}
|
||||||
{disabled}
|
{actionType}
|
||||||
{actionType}
|
{schema}
|
||||||
{schema}
|
{table}
|
||||||
{table}
|
{initialValues}
|
||||||
{initialValues}
|
{disableValidation}
|
||||||
{disableValidation}
|
{editAutoColumns}
|
||||||
{editAutoColumns}
|
>
|
||||||
>
|
<slot />
|
||||||
<slot />
|
</InnerForm>
|
||||||
</InnerForm>
|
{/key}
|
||||||
{/key}
|
|
||||||
{/if}
|
|
||||||
|
|
Loading…
Reference in New Issue