Added default config values for buttons on auto screen creation. Added behaviour to accomodate screens created without defaults set.

This commit is contained in:
Dean 2023-09-25 10:59:34 +01:00
parent 7db7159b4c
commit fcb1575da5
2 changed files with 3 additions and 1 deletions

View File

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

View File

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