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 09a8b491c7..582a7126e7 100644
--- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/EventPropertyControl.svelte
+++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/EventPropertyControl.svelte
@@ -4,6 +4,7 @@
import { notifications } from "@budibase/bbui"
import EventEditor from "./EventEditor.svelte"
import { automationStore } from "builderStore"
+ import { cloneDeep } from "lodash/fp"
const dispatch = createEventDispatcher()
@@ -12,17 +13,23 @@
export let bindings
let drawer
+ let tmpValue
+
+ const openDrawer = () => {
+ tmpValue = cloneDeep(value)
+ drawer.show()
+ }
const saveEventData = async () => {
// any automations that need created from event triggers
- const automationsToCreate = value.filter(
+ const automationsToCreate = tmpValue.filter(
action => action["##eventHandlerType"] === "Trigger Automation"
)
for (let action of automationsToCreate) {
await createAutomation(action.parameters)
}
- dispatch("change", value)
+ dispatch("change", tmpValue)
notifications.success("Component actions saved.")
drawer.hide()
}
@@ -54,11 +61,16 @@
}
-Define actions
+Define actions
Define what actions to run.
-
+