diff --git a/packages/builder/package.json b/packages/builder/package.json
index bf4c4b4a89..fdcb9ae4a1 100644
--- a/packages/builder/package.json
+++ b/packages/builder/package.json
@@ -63,7 +63,7 @@
}
},
"dependencies": {
- "@budibase/bbui": "^1.58.12",
+ "@budibase/bbui": "^1.58.13",
"@budibase/client": "^0.7.8",
"@budibase/colorpicker": "1.0.1",
"@budibase/string-templates": "^0.7.8",
diff --git a/packages/builder/src/builderStore/dataBinding.js b/packages/builder/src/builderStore/dataBinding.js
index b2eb30c55a..eaf64b23b9 100644
--- a/packages/builder/src/builderStore/dataBinding.js
+++ b/packages/builder/src/builderStore/dataBinding.js
@@ -231,6 +231,15 @@ export const getSchemaForDatasource = (datasource, isForm = false) => {
if (table) {
if (type === "view") {
schema = cloneDeep(table.views?.[datasource.name]?.schema)
+
+ // Some calc views don't include a "name" property inside the schema
+ if (schema) {
+ Object.keys(schema).forEach(field => {
+ if (!schema[field].name) {
+ schema[field].name = field
+ }
+ })
+ }
} else if (type === "query" && isForm) {
schema = {}
const params = table.parameters || []
diff --git a/packages/builder/src/components/common/DrawerBindableInput.svelte b/packages/builder/src/components/common/DrawerBindableInput.svelte
index 4b0109270a..b534376a55 100644
--- a/packages/builder/src/components/common/DrawerBindableInput.svelte
+++ b/packages/builder/src/components/common/DrawerBindableInput.svelte
@@ -10,10 +10,13 @@
export let value = ""
export let bindings = []
+ export let thin = true
+ export let title = "Bindings"
+ export let placeholder
let bindingDrawer
- let tempValue = value
+ $: tempValue = value
$: readableValue = runtimeToReadableBinding(bindings, value)
const handleClose = () => {
@@ -28,15 +31,15 @@
-
+
Add the objects on the left to enrich your text.
@@ -57,7 +60,6 @@
diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/EventPropertyControl.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/EventPropertyControl.svelte
index 241864839a..9a239a4e1b 100644
--- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/EventPropertyControl.svelte
+++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/EventPropertyControl.svelte
@@ -17,7 +17,9 @@
const automationsToCreate = value.filter(
action => action["##eventHandlerType"] === "Trigger Automation"
)
- automationsToCreate.forEach(action => createAutomation(action.parameters))
+ for (let action of automationsToCreate) {
+ await createAutomation(action.parameters)
+ }
dispatch("change", value)
notifier.success("Component actions saved.")
@@ -27,11 +29,8 @@
// called by the parent modal when actions are saved
const createAutomation = async parameters => {
if (parameters.automationId || !parameters.newAutomationName) return
-
await automationStore.actions.create({ name: parameters.newAutomationName })
-
const appActionDefinition = $automationStore.blockDefinitions.TRIGGER.APP
-
const newBlock = $automationStore.selectedAutomation.constructBlock(
"TRIGGER",
"APP",
@@ -39,19 +38,14 @@
)
newBlock.inputs = {
- fields: Object.entries(parameters.fields).reduce(
- (fields, [key, value]) => {
- fields[key] = value.type
- return fields
- },
- {}
- ),
+ fields: Object.keys(parameters.fields).reduce((fields, key) => {
+ fields[key] = "string"
+ return fields
+ }, {}),
}
automationStore.actions.addBlockToAutomation(newBlock)
-
await automationStore.actions.save($automationStore.selectedAutomation)
-
parameters.automationId = $automationStore.selectedAutomation.automation._id
delete parameters.newAutomationName
}
diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/DeleteRow.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/DeleteRow.svelte
index 79ee23acd7..425c6f9c58 100644
--- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/DeleteRow.svelte
+++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/DeleteRow.svelte
@@ -37,8 +37,8 @@
a List
{:else}
-
-