Merge pull request #9984 from Budibase/fix/automation-saving-fix
Fix issue with saving of automation fields
This commit is contained in:
commit
cc4a911505
|
@ -32,7 +32,6 @@
|
|||
import { getSchemaForTable } from "builderStore/dataBinding"
|
||||
import { Utils } from "@budibase/frontend-core"
|
||||
import { TriggerStepID, ActionStepID } from "constants/backend/automations"
|
||||
import { cloneDeep } from "lodash/fp"
|
||||
import { onMount } from "svelte"
|
||||
|
||||
export let block
|
||||
|
@ -63,9 +62,6 @@
|
|||
|
||||
const getInputData = (testData, blockInputs) => {
|
||||
let newInputData = testData || blockInputs
|
||||
if (block.event === "app:trigger" && !newInputData?.fields) {
|
||||
newInputData = cloneDeep(blockInputs)
|
||||
}
|
||||
inputData = newInputData
|
||||
}
|
||||
|
||||
|
@ -214,8 +210,6 @@
|
|||
function saveFilters(key) {
|
||||
const filters = LuceneUtils.buildLuceneQuery(tempFilters)
|
||||
const defKey = `${key}-def`
|
||||
inputData[key] = filters
|
||||
inputData[defKey] = tempFilters
|
||||
onChange({ detail: filters }, key)
|
||||
// need to store the builder definition in the automation
|
||||
onChange({ detail: tempFilters }, defKey)
|
||||
|
|
|
@ -95,8 +95,11 @@
|
|||
}
|
||||
|
||||
const onChange = (e, field, type) => {
|
||||
value[field] = coerce(e.detail, type)
|
||||
dispatch("change", value)
|
||||
let newValue = {
|
||||
...value,
|
||||
[field]: coerce(e.detail, type),
|
||||
}
|
||||
dispatch("change", newValue)
|
||||
}
|
||||
|
||||
const onChangeSetting = (e, field) => {
|
||||
|
|
|
@ -107,7 +107,7 @@ export function substituteLoopStep(hbsString: string, substitute: string) {
|
|||
let pointer = 0,
|
||||
openPointer = 0,
|
||||
closedPointer = 0
|
||||
while (pointer < hbsString.length) {
|
||||
while (pointer < hbsString?.length) {
|
||||
openPointer = hbsString.indexOf(open, pointer)
|
||||
closedPointer = hbsString.indexOf(closed, pointer) + 2
|
||||
if (openPointer < 0 || closedPointer < 0) {
|
||||
|
|
Loading…
Reference in New Issue