Fix huge amount of wasted renders by observing entire component context when generating form block fields
This commit is contained in:
parent
3788d67e8d
commit
80cc83d2f0
|
@ -34,6 +34,7 @@
|
||||||
$: formattedFields = convertOldFieldFormat(fields)
|
$: formattedFields = convertOldFieldFormat(fields)
|
||||||
$: fieldsOrDefault = getDefaultFields(formattedFields, schema)
|
$: fieldsOrDefault = getDefaultFields(formattedFields, schema)
|
||||||
$: fetchSchema(dataSource)
|
$: fetchSchema(dataSource)
|
||||||
|
$: id = $component.id
|
||||||
// We could simply spread $$props into the inner form and append our
|
// We could simply spread $$props into the inner form and append our
|
||||||
// additions, but that would create svelte warnings about unused props and
|
// additions, but that would create svelte warnings about unused props and
|
||||||
// make maintenance in future more confusing as we typically always have a
|
// make maintenance in future more confusing as we typically always have a
|
||||||
|
@ -53,7 +54,7 @@
|
||||||
buttons:
|
buttons:
|
||||||
buttons ||
|
buttons ||
|
||||||
Utils.buildFormBlockButtonConfig({
|
Utils.buildFormBlockButtonConfig({
|
||||||
_id: $component.id,
|
_id: id,
|
||||||
showDeleteButton,
|
showDeleteButton,
|
||||||
showSaveButton,
|
showSaveButton,
|
||||||
saveButtonLabel,
|
saveButtonLabel,
|
||||||
|
|
Loading…
Reference in New Issue