Fix view form block not showing data and move size setting to general section

This commit is contained in:
Andrew Kingston 2022-08-23 15:08:39 +01:00
parent 090796aa42
commit 382aac3ad4
2 changed files with 21 additions and 20 deletions

View File

@ -4399,11 +4399,12 @@
},
{
"type": "text",
"label": "Row ID to update",
"label": "Row ID",
"key": "rowId",
"dependsOn": {
"setting": "actionType",
"value": "Update"
"value": "Create",
"invert": true
}
},
{
@ -4412,6 +4413,22 @@
"key": "title",
"nested": true
},
{
"type": "select",
"label": "Size",
"key": "size",
"options": [
{
"label": "Medium",
"value": "spectrum--medium"
},
{
"label": "Large",
"value": "spectrum--large"
}
],
"defaultValue": "spectrum--medium"
},
{
"section": true,
"name": "Fields",
@ -4437,22 +4454,6 @@
}
]
},
{
"type": "select",
"label": "Size",
"key": "size",
"options": [
{
"label": "Medium",
"value": "spectrum--medium"
},
{
"label": "Large",
"value": "spectrum--large"
}
],
"defaultValue": "spectrum--medium"
},
{
"type": "boolean",
"label": "Disabled",

View File

@ -90,7 +90,7 @@
// 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 === "Update"
actionType !== "Create"
? `{{ literal ${safe(providerId)} }}`
: { rows: [{}] }
@ -133,7 +133,7 @@
<BlockComponent
type="form"
props={{
actionType,
actionType: actionType === "Create" ? "Create" : "Update",
dataSource,
size,
disabled: disabled || actionType === "View",