Quick fix to allow data UI to show relational fields.
This commit is contained in:
parent
aa9f836572
commit
429d415cc9
|
@ -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
|
||||
|
|
|
@ -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 []
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue