Merge pull request #13342 from Budibase/disable-single-attachment-column

Disabling single attachment column
This commit is contained in:
Michael Drury 2024-03-22 16:22:45 +00:00 committed by GitHub
commit 5de0d32cd5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 21 deletions

View File

@ -34,12 +34,7 @@
import { getBindings } from "components/backend/DataTable/formula"
import JSONSchemaModal from "./JSONSchemaModal.svelte"
import { ValidColumnNameRegex } from "@budibase/shared-core"
import {
FieldType,
FieldSubtype,
SourceName,
FieldTypeSubtypes,
} from "@budibase/types"
import { FieldType, FieldSubtype, SourceName } from "@budibase/types"
import RelationshipSelector from "components/common/RelationshipSelector.svelte"
import { RowUtils } from "@budibase/frontend-core"
import ServerBindingPanel from "components/common/bindings/ServerBindingPanel.svelte"
@ -710,21 +705,6 @@
thin
text="Allow multiple users"
/>
{:else if editableColumn.type === FieldType.ATTACHMENT}
<Toggle
value={editableColumn.subtype !== FieldTypeSubtypes.ATTACHMENT.SINGLE &&
// Checking config before the subtype was added
editableColumn.constraints?.length?.maximum !== 1}
on:change={e => {
if (!e.detail) {
editableColumn.subtype = FieldTypeSubtypes.ATTACHMENT.SINGLE
} else {
delete editableColumn.subtype
}
}}
thin
text="Allow multiple"
/>
{/if}
{#if editableColumn.type === AUTO_TYPE || editableColumn.autocolumn}
<Select