1
0
Fork 0
mirror of synced 2024-10-06 04:54:52 +13:00

fix direct mutation of inputdata in rowselector

This commit is contained in:
Peter Clement 2023-03-14 13:57:36 +00:00
parent 6d6a4816a0
commit b854e06b33
2 changed files with 5 additions and 7 deletions

View file

@ -63,9 +63,6 @@
const getInputData = (testData, blockInputs) => {
let newInputData = testData || blockInputs
if (block.event === "app:trigger" && !newInputData?.fields) {
newInputData = cloneDeep(blockInputs)
}
inputData = newInputData
}
@ -214,8 +211,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)

View file

@ -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) => {