Fix filtering pg datasource

This commit is contained in:
Adria Navarro 2023-10-04 12:20:19 +02:00
parent 96b077f8a5
commit 63306d3509
1 changed files with 7 additions and 1 deletions

View File

@ -13,7 +13,13 @@
let modal let modal
$: tempValue = filters || [] $: tempValue = filters || []
$: schemaFields = Object.values(schema || {}) $: 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,
})
)
$: text = getText(filters) $: text = getText(filters)
$: selected = tempValue.filter(x => !x.onEmptyFilter)?.length > 0 $: selected = tempValue.filter(x => !x.onEmptyFilter)?.length > 0