1
0
Fork 0
mirror of synced 2024-05-17 10:53:15 +12:00

Fix Form Block Create Mode Bindings Causing Error When Ejected

This commit is contained in:
Gerard Burns 2022-11-02 18:17:20 +00:00
parent d2e46fb13d
commit 9a75b31efc

View file

@ -85,13 +85,8 @@
valueType: "Binding",
},
]
// If we're using an "update" form, use the real data provider. If we're
// using a create form, we just want a fake array so that our repeater
// will actually render the form, but data doesn't matter.
$: dataProvider =
actionType !== "Create"
? `{{ literal ${safe(providerId)} }}`
: { rows: [{}] }
$: dataProvider = `{{ literal ${safe(providerId)} }}`
$: renderDeleteButton = showDeleteButton && actionType === "Update"
$: renderSaveButton = showSaveButton && actionType !== "View"
$: renderButtons = renderDeleteButton || renderSaveButton