Added default config values for buttons on auto screen creation. Added behaviour to accomodate screens created without defaults set.
This commit is contained in:
parent
7db7159b4c
commit
fcb1575da5
|
@ -33,6 +33,8 @@ const generateTableBlock = datasource => {
|
|||
showTitleButton: true,
|
||||
titleButtonText: "Create row",
|
||||
titleButtonClickBehaviour: "new",
|
||||
sidePanelSaveLabel: "Save",
|
||||
sidePanelDeleteLabel: "Delete"
|
||||
})
|
||||
.instanceName(`${datasource.label} - Table block`)
|
||||
return tableBlock
|
||||
|
|
|
@ -249,7 +249,7 @@
|
|||
props={{
|
||||
dataSource,
|
||||
saveButtonLabel: sidePanelSaveLabel || "Save", //always show
|
||||
deleteButtonLabel: deleteLabel, //respect config
|
||||
deleteButtonLabel: deleteLabel == "" ? "" : "Delete",
|
||||
actionType: "Update",
|
||||
rowId: `{{ ${safe("state")}.${safe(stateKey)} }}`,
|
||||
fields: sidePanelFields || normalFields,
|
||||
|
|
Loading…
Reference in New Issue