1
0
Fork 0
mirror of synced 2024-09-10 06:26:02 +12:00

Quick fix to allow data UI to show relational fields.

This commit is contained in:
mike12345567 2024-05-21 18:14:19 +01:00
parent aa9f836572
commit 429d415cc9
2 changed files with 3 additions and 6 deletions

View file

@ -4,6 +4,7 @@
import FilterBuilder from "components/design/settings/controls/FilterEditor/FilterBuilder.svelte"
import { getUserBindings } from "dataBinding"
import { makePropSafe } from "@budibase/string-templates"
import { getFields } from "helpers/searchFields"
export let schema
export let filters
@ -15,12 +16,7 @@
let drawer
$: tempValue = filters || []
$: schemaFields = Object.entries(schema || {}).map(
([fieldName, fieldSchema]) => ({
name: fieldName, // Using the key as name if not defined in the schema, for example in some autogenerated columns
...fieldSchema,
})
)
$: schemaFields = getFields(Object.values(schema || {}), { allowLinks: true })
$: text = getText(filters)
$: selected = tempValue.filter(x => !x.onEmptyFilter)?.length > 0

View file

@ -4,6 +4,7 @@ import { get } from "svelte/store"
export function getTableFields(linkField) {
const table = get(tables).list.find(table => table._id === linkField.tableId)
// TODO: mdrury - add support for this with SQS at some point
if (!table || !table.sql) {
return []
}