Fix formatting.

This commit is contained in:
Sam Rose 2025-03-11 17:34:18 +00:00
parent e142d2cc81
commit b60bfe1d35
No known key found for this signature in database
1 changed files with 41 additions and 39 deletions

View File

@ -391,49 +391,51 @@
if (!isTestModal) { if (!isTestModal) {
return [] return []
} }
return [{ return [
type: CoreSelect, {
title: "Row", type: CoreSelect,
props: { title: "Row",
disabled: !table, props: {
placeholder: "Select a row", disabled: !table,
options: fetchedRows, placeholder: "Select a row",
loading: fetchLoading, options: fetchedRows,
value: selectedRow, loading: fetchLoading,
autocomplete: true, value: selectedRow,
filter: false, autocomplete: true,
getOptionLabel: row => row?.[primaryDisplay] || "", filter: false,
compare: (a, b) => a?.[primaryDisplay] === b?.[primaryDisplay], getOptionLabel: row => row?.[primaryDisplay] || "",
onChange: e => { compare: (a, b) => a?.[primaryDisplay] === b?.[primaryDisplay],
if (isTestModal) { onChange: e => {
onChange({ if (isTestModal) {
id: e.detail?._id, onChange({
revision: e.detail?._rev, id: e.detail?._id,
row: e.detail, revision: e.detail?._rev,
oldRow: e.detail, row: e.detail,
meta: { oldRow: e.detail,
fields: inputData["meta"]?.fields || {}, meta: {
oldFields: e.detail?.meta?.fields || {}, fields: inputData["meta"]?.fields || {},
}, oldFields: e.detail?.meta?.fields || {},
}) },
} })
}
},
}, },
}, },
}, {
{ type: InfoDisplay,
type: InfoDisplay, props: {
props: { warning: true,
warning: true, icon: "AlertCircleFilled",
icon: "AlertCircleFilled", body: `Be careful when testing this automation because your data may be modified or deleted.`,
body: `Be careful when testing this automation because your data may be modified or deleted.`, },
}, },
}, {
{ type: Divider,
type: Divider, props: {
props: { noMargin: true,
noMargin: true, },
}, },
}] ]
} }
stepLayouts[block.stepId] = { stepLayouts[block.stepId] = {