PR Feeback. Remove X icons in form.

This commit is contained in:
Dean 2024-06-28 09:12:45 +01:00
parent 82f50b565d
commit 16061765ee
1 changed files with 33 additions and 50 deletions

View File

@ -234,8 +234,36 @@
{#each schemaFields || [] as [field, schema]} {#each schemaFields || [] as [field, schema]}
{#if !schema.autocolumn && Object.hasOwn(editableFields, field)} {#if !schema.autocolumn && Object.hasOwn(editableFields, field)}
<PropField label={field} fullWidth={isFullWidth(schema.type)}> <PropField label={field} fullWidth={isFullWidth(schema.type)}>
<div class="prop-control-wrap"> {#if isTestModal}
{#if isTestModal} <RowSelectorTypes
{isTestModal}
{field}
{schema}
bindings={parsedBindings}
value={editableRow}
meta={{
fields: editableFields,
}}
{onChange}
/>
{:else}
<DrawerBindableSlot
title={$memoStore?.row?.title || field}
panel={AutomationBindingPanel}
type={schema.type}
{schema}
value={editableRow[field]}
on:change={e =>
onChange({
row: {
[field]: e.detail,
},
})}
{bindings}
allowJS={true}
updateOnChange={false}
drawerLeft="260px"
>
<RowSelectorTypes <RowSelectorTypes
{isTestModal} {isTestModal}
{field} {field}
@ -245,49 +273,10 @@
meta={{ meta={{
fields: editableFields, fields: editableFields,
}} }}
{onChange} onChange={change => onChange(change)}
/> />
{:else} </DrawerBindableSlot>
<DrawerBindableSlot {/if}
title={$memoStore?.row?.title || field}
panel={AutomationBindingPanel}
type={schema.type}
{schema}
value={editableRow[field]}
on:change={e =>
onChange({
row: {
[field]: e.detail,
},
})}
{bindings}
allowJS={true}
updateOnChange={false}
drawerLeft="260px"
>
<RowSelectorTypes
{isTestModal}
{field}
{schema}
bindings={parsedBindings}
value={editableRow}
meta={{
fields: editableFields,
}}
onChange={change => onChange(change)}
/>
</DrawerBindableSlot>
{/if}
<Icon
hoverable
name="Close"
on:click={() =>
onChange({
row: { [field]: null },
meta: { fields: { [field]: null } },
})}
/>
</div>
</PropField> </PropField>
{/if} {/if}
{/each} {/each}
@ -369,12 +358,6 @@
color: var(--spectrum-global-color-gray-500); color: var(--spectrum-global-color-gray-500);
} }
.prop-control-wrap {
display: grid;
grid-template-columns: 1fr min-content;
gap: var(--spacing-s);
}
/* Override for general json field override */ /* Override for general json field override */
.prop-control-wrap :global(.icon.json-slot-icon) { .prop-control-wrap :global(.icon.json-slot-icon) {
right: 1px !important; right: 1px !important;