{ "inherits": "@budibase/standard-components/container", "name": "Contact/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 Contact", "onClick": [ { "##eventHandlerType": "Get New Record", "parameters": { "statePath": "Contact", "collectionKey": "/contacts", "childRecordType": "Contact" } }, { "##eventHandlerType": "Set State", "parameters": { "path": "isEditingContact", "value": "true" } } ] } }, { "component": { "_component": "common/Default Button", "contentText": "Refresh", "onClick": [ { "##eventHandlerType": "List Records", "parameters": { "statePath": "/all_contacts", "indexKey": "/all_contacts" } } ] } } ] } }, { "component": { "_component": "@budibase/standard-components/if", "condition": "$store.selectedrow_all_contacts && $store.selectedrow_all_contacts.length > 0", "thenComponent": { "_component": "@budibase/standard-components/container", "className": "btn-group", "children": [ { "component": { "_component": "common/Default Button", "contentText": "Edit Contact", "onClick": [ { "##eventHandlerType": "Load Record", "parameters": { "statePath": "Contact", "recordKey": { "##bbstate": "selectedrow_all_contacts", "##source": "store" } } }, { "##eventHandlerType": "Set State", "parameters": { "path": "isEditingContact", "value": "true" } } ] } }, { "component": { "_component": "common/Default Button", "contentText": "Delete Contact", "onClick": [ { "##eventHandlerType": "Delete Record", "parameters": { "recordKey": { "##bbstate": "selectedrow_all_contacts", "##source": "store" } } } ] } } ] } } } ] } }