Allow custom labels for dynamic filter
This commit is contained in:
parent
cc3b174f87
commit
68d0a4c336
|
@ -3940,10 +3940,11 @@
|
|||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "multifield",
|
||||
"label": "Allowed filter fields",
|
||||
"type": "columns",
|
||||
"label": "Allowed filter columns",
|
||||
"key": "allowedFields",
|
||||
"placeholder": "All fields"
|
||||
"dependsOn": "dataProvider",
|
||||
"nested": true
|
||||
},
|
||||
{
|
||||
"type": "select",
|
||||
|
|
|
@ -61,8 +61,9 @@
|
|||
clonedSchema = schema
|
||||
} else {
|
||||
allowedFields?.forEach(field => {
|
||||
if (schema[field]) {
|
||||
clonedSchema[field] = schema[field]
|
||||
if (schema[field.name]) {
|
||||
clonedSchema[field.name] = schema[field.name]
|
||||
clonedSchema[field.name].displayName = field.displayName
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
@ -25,7 +25,10 @@
|
|||
!BannedTypes.includes(field.type) ||
|
||||
(field.type === "formula" && field.formulaType === "static")
|
||||
)
|
||||
.map(field => field.name)
|
||||
.map(field => ({
|
||||
label: field.displayName || field.name,
|
||||
value: field.name,
|
||||
}))
|
||||
|
||||
const addFilter = () => {
|
||||
filters = [
|
||||
|
|
Loading…
Reference in New Issue