1
0
Fork 0
mirror of synced 2024-08-04 04:41:37 +12:00
budibase/packages/server/appPackages/testApp2/components/customer/customer Form.json
Michael Shanks b7d9e05641
Work on Components API & bugfixes (#102)
* typo - screens not being sent to page save

* removed children arg from hydrateChildren (n/a)

* initialiseChildren does not rerender unless forced

* removed derivatives of initialiseChildren

* renamed initialiseChildren > attachChildren

* standard-components - refactoring

div now container
H1, h2... etc now Heading with type
Select now takes option as _children

* loads of bug fixing

* safe props creation
anytime props are loaded,
we make sure they conform to the components props definition
2020-02-14 11:51:45 +00:00

121 lines
3.6 KiB
JSON

{
"name": "customer/customer Form",
"description": "Control for creating/updating '/customers/1-{id}' ",
"inherits": "@budibase/standard-components/container",
"props": {
"className": "p-1",
"children": [
{
"component": {
"_component": "@budibase/standard-components/h3",
"text": "Edit customer"
}
},
{
"component": {
"_component": "@budibase/standard-components/form",
"formControls": [
{
"control": {
"_component": "@budibase/standard-components/input",
"value": {
"##bbstate": "customer.name",
"##bbsource": "store"
},
"className": "form-control",
"type": "text"
},
"label": "Name"
},
{
"control": {
"_component": "@budibase/standard-components/select",
"options": [
{
"id": "Google",
"value": "Google"
},
{
"id": "Facebook",
"value": "Facebook"
},
{
"id": "Word of Mouth",
"value": "Word of Mouth"
}
],
"value": {
"##bbstate": "customer.enquiry",
"##bbsource": "store"
},
"className": "form-control"
},
"label": "Enquiry Source"
}
]
}
},
{
"component": {
"_component": "@budibase/standard-components/stackpanel",
"direction": "horizontal",
"children": [
{
"control": {
"_component": "@budibase/standard-components/container",
"className": "btn-group",
"children": [
{
"component": {
"_component": "common/Primary Button",
"contentText": "Save customer",
"onClick": [
{
"##eventHandlerType": "Save Record",
"parameters": {
"statePath": "customer"
}
},
{
"##eventHandlerType": "Set State",
"parameters": {
"path": "isEditingcustomer",
"value": ""
}
}
]
}
}
]
}
},
{
"control": {
"_component": "@budibase/standard-components/container",
"className": "btn-group",
"children": [
{
"component": {
"_component": "common/Default Button",
"contentText": "Cancel",
"onClick": [
{
"##eventHandlerType": "Set State",
"parameters": {
"path": "isEditingcustomer",
"value": ""
}
}
]
}
}
]
}
}
]
}
}
]
}
}