Fix Form Block Create Mode Bindings Causing Error When Ejected
This commit is contained in:
parent
85d29b27b9
commit
db26fce00b
|
@ -85,13 +85,8 @@
|
||||||
valueType: "Binding",
|
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
|
$: dataProvider = `{{ literal ${safe(providerId)} }}`
|
||||||
// will actually render the form, but data doesn't matter.
|
|
||||||
$: dataProvider =
|
|
||||||
actionType !== "Create"
|
|
||||||
? `{{ literal ${safe(providerId)} }}`
|
|
||||||
: { rows: [{}] }
|
|
||||||
$: renderDeleteButton = showDeleteButton && actionType === "Update"
|
$: renderDeleteButton = showDeleteButton && actionType === "Update"
|
||||||
$: renderSaveButton = showSaveButton && actionType !== "View"
|
$: renderSaveButton = showSaveButton && actionType !== "View"
|
||||||
$: renderButtons = renderDeleteButton || renderSaveButton
|
$: renderButtons = renderDeleteButton || renderSaveButton
|
||||||
|
|
Loading…
Reference in New Issue