Browse Source

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

pull/7456/head
Andrew Kingston 4 years ago
parent
commit
df2b86ec4b
  1. 37
      packages/client/manifest.json
  2. 4
      packages/client/src/components/app/blocks/FormBlock.svelte

37
packages/client/manifest.json

@ -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",

4
packages/client/src/components/app/blocks/FormBlock.svelte

@ -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",

Loading…
Cancel
Save