1
0
Fork 0
mirror of synced 2024-08-04 04:41:37 +12:00
budibase/packages/server/appPackages/testApp2/components/customer/homepage buttons.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

110 lines
3.4 KiB
JSON

{
"inherits": "@budibase/standard-components/container",
"name": "customer/homepage buttons",
"props": {
"className": "btn-toolbar mt-4 mb-2",
"children": [
{
"component": {
"_component": "@budibase/standard-components/container",
"className": "btn-group mr-3",
"children": [
{
"component": {
"_component": "common/Default Button",
"contentText": "Create customer",
"onClick": [
{
"##eventHandlerType": "Get New Record",
"parameters": {
"statePath": "customer",
"collectionKey": "/customers",
"childRecordType": "customer"
}
},
{
"##eventHandlerType": "Set State",
"parameters": {
"path": "isEditingcustomer",
"value": "true"
}
}
]
}
},
{
"component": {
"_component": "common/Default Button",
"contentText": "Refresh",
"onClick": [
{
"##eventHandlerType": "List Records",
"parameters": {
"statePath": "/all_customers",
"indexKey": "/all_customers"
}
}
]
}
}
]
}
},
{
"component": {
"_component": "@budibase/standard-components/if",
"condition": "$store.selectedrow_all_customers && $store.selectedrow_all_customers.length > 0",
"thenComponent": {
"_component": "@budibase/standard-components/container",
"className": "btn-group",
"children": [
{
"component": {
"_component": "common/Default Button",
"contentText": "Edit customer",
"onClick": [
{
"##eventHandlerType": "Load Record",
"parameters": {
"statePath": "customer",
"recordKey": {
"##bbstate": "selectedrow_all_customers",
"##source": "store"
}
}
},
{
"##eventHandlerType": "Set State",
"parameters": {
"path": "isEditingcustomer",
"value": "true"
}
}
]
}
},
{
"component": {
"_component": "common/Default Button",
"contentText": "Delete customer",
"onClick": [
{
"##eventHandlerType": "Delete Record",
"parameters": {
"recordKey": {
"##bbstate": "selectedrow_all_customers",
"##source": "store"
}
}
}
]
}
}
]
}
}
}
]
}
}