Merge pull request #13579 from Budibase/fix/schema-panel-null-references

[Fix] Schema panel null references
This commit is contained in:
Adria Navarro 2024-05-02 10:11:19 +01:00 committed by GitHub
commit 72725ce49b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 2 deletions

View File

@ -25,6 +25,6 @@
name="field" name="field"
headings headings
options={SchemaTypeOptionsExpanded} options={SchemaTypeOptionsExpanded}
compare={(option, value) => option.type === value.type} compare={(option, value) => option.type === value?.type}
/> />
{/key} {/key}

View File

@ -695,7 +695,7 @@
menuItems={schemaMenuItems} menuItems={schemaMenuItems}
showMenu={!schemaReadOnly} showMenu={!schemaReadOnly}
readOnly={schemaReadOnly} readOnly={schemaReadOnly}
compare={(option, value) => option.type === value.type} compare={(option, value) => option.type === value?.type}
/> />
</Tab> </Tab>
{/if} {/if}

View File

@ -253,6 +253,7 @@ export const SchemaTypeOptions = [
{ label: "Number", value: FieldType.NUMBER }, { label: "Number", value: FieldType.NUMBER },
{ label: "Boolean", value: FieldType.BOOLEAN }, { label: "Boolean", value: FieldType.BOOLEAN },
{ label: "Datetime", value: FieldType.DATETIME }, { label: "Datetime", value: FieldType.DATETIME },
{ label: "JSON", value: FieldType.JSON },
] ]
export const SchemaTypeOptionsExpanded = SchemaTypeOptions.map(el => ({ export const SchemaTypeOptionsExpanded = SchemaTypeOptions.map(el => ({