Filter out fields without filtering options

This commit is contained in:
Adria Navarro 2024-04-11 09:30:57 +02:00
parent e8dbb8f681
commit cf2778cbaa
1 changed files with 3 additions and 1 deletions

View File

@ -46,7 +46,9 @@
$: parseFilters(filters)
$: dispatch("change", enrichFilters(rawFilters, matchAny, onEmptyFilter))
$: enrichedSchemaFields = getFields(schemaFields || [], { allowLinks: true })
$: enrichedSchemaFields = getFields(schemaFields || [], {
allowLinks: true,
}).filter(f => !!getValidOperatorsForType({ field: f.name, ...f }).length)
$: fieldOptions = enrichedSchemaFields.map(field => field.name) || []
$: valueTypeOptions = allowBindings ? ["Value", "Binding"] : ["Value"]