1
0
Fork 0
mirror of synced 2024-09-20 19:33:10 +12:00

Field readonly

This commit is contained in:
Adria Navarro 2024-07-18 13:34:15 +02:00
parent 1843233168
commit b75c8b32e3
3 changed files with 8 additions and 0 deletions

View file

@ -869,6 +869,7 @@
options={value.enum}
getOptionLabel={(x, idx) =>
value.pretty ? value.pretty[idx] : x}
disabled={value.readonly}
/>
{:else if value.type === "json"}
<Editor
@ -877,6 +878,7 @@
mode="json"
value={inputData[key]?.value}
on:change={e => onChange({ [key]: e.detail })}
readOnly={value.readonly}
/>
{:else if value.type === "boolean"}
<div style="margin-top: 10px">
@ -884,6 +886,7 @@
text={value.title}
value={inputData[key]}
on:change={e => onChange({ [key]: e.detail })}
disabled={value.readonly}
/>
</div>
{:else if value.type === "date"}
@ -897,6 +900,7 @@
allowJS={true}
updateOnChange={false}
drawerLeft="260px"
disabled={value.readonly}
>
<DatePicker
value={inputData[key]}
@ -908,6 +912,7 @@
on:change={e => onChange({ [key]: e.detail })}
value={inputData[key]}
options={Object.keys(table?.schema || {})}
disabled={value.readonly}
/>
{:else if value.type === "attachment" || value.type === "signature_single"}
<div class="attachment-field-wrapper">
@ -1021,6 +1026,7 @@
{isTrigger}
value={inputData[key]}
on:change={e => onChange({ [key]: e.detail })}
disabled={value.readonly}
/>
{:else if value.customType === "webhookUrl"}
<WebhookDisplay value={inputData[key]} />

View file

@ -76,6 +76,7 @@ export async function create(tableId: string, rowAction: { name: string }) {
type: AutomationIOType.STRING,
customType: AutomationCustomIOType.TABLE,
title: "Table",
readonly: true,
},
},
required: ["tableId"],

View file

@ -153,6 +153,7 @@ interface BaseIOStructure {
[key: string]: BaseIOStructure
}
required?: string[]
readonly?: true
}
export interface InputOutputBlock {