Fix field selector on datasource picker

This commit is contained in:
Adria Navarro 2025-01-03 12:48:35 +01:00
parent 97b0883c6b
commit 550cdd7268
1 changed files with 5 additions and 3 deletions

View File

@ -43,7 +43,6 @@
export let showDataProviders = true export let showDataProviders = true
const dispatch = createEventDispatcher() const dispatch = createEventDispatcher()
const arrayTypes = ["attachment", "array"]
let anchorRight, dropdownRight let anchorRight, dropdownRight
let drawer let drawer
@ -116,8 +115,11 @@
} }
}) })
$: fields = bindings $: fields = bindings
.filter(x => arrayTypes.includes(x.fieldSchema?.type)) .filter(
.filter(x => x.fieldSchema?.tableId != null) x =>
x.fieldSchema?.type === "attachment" ||
(x.fieldSchema?.type === "array" && x.tableId)
)
.map(binding => { .map(binding => {
const { providerId, readableBinding, runtimeBinding } = binding const { providerId, readableBinding, runtimeBinding } = binding
const { name, type, tableId } = binding.fieldSchema const { name, type, tableId } = binding.fieldSchema