Fix Skeleton Loader Jumping
This commit is contained in:
parent
e9269b0e92
commit
8eccee030a
|
@ -2598,6 +2598,7 @@
|
|||
]
|
||||
},
|
||||
"passwordfield": {
|
||||
"skeleton": false,
|
||||
"name": "Password Field",
|
||||
"icon": "LockClosed",
|
||||
"styles": [
|
||||
|
@ -3066,6 +3067,7 @@
|
|||
]
|
||||
},
|
||||
"longformfield": {
|
||||
"skeleton": false,
|
||||
"name": "Long Form Field",
|
||||
"icon": "TextAlignLeft",
|
||||
"styles": [
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
const context = getContext("context")
|
||||
const { API, fetchDatasourceSchema } = getContext("sdk")
|
||||
|
||||
let loaded = false
|
||||
let schema
|
||||
let table
|
||||
|
||||
|
@ -56,18 +55,17 @@
|
|||
}
|
||||
const res = await fetchDatasourceSchema(dataSource)
|
||||
schema = res || {}
|
||||
if (!loaded) {
|
||||
loaded = true
|
||||
}
|
||||
}
|
||||
|
||||
$: initialValues = getInitialValues(actionType, dataSource, $context)
|
||||
$: resetKey = Helpers.hashString(
|
||||
JSON.stringify(initialValues) + JSON.stringify(dataSource) + disabled
|
||||
JSON.stringify(schema) +
|
||||
JSON.stringify(initialValues) +
|
||||
JSON.stringify(dataSource) +
|
||||
disabled
|
||||
)
|
||||
</script>
|
||||
|
||||
{#if loaded}
|
||||
{#key resetKey}
|
||||
<InnerForm
|
||||
{dataSource}
|
||||
|
@ -84,4 +82,3 @@
|
|||
<slot />
|
||||
</InnerForm>
|
||||
{/key}
|
||||
{/if}
|
||||
|
|
Loading…
Reference in New Issue