mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 05:29:26 +08:00
fix(data-vi): enum field options are empty in the filter block (#6706)
* fix(data-vi): enum field options are empty in the filter block * fix: specific props
This commit is contained in:
parent
5931e2914e
commit
97f4a6ccff
@ -135,11 +135,10 @@ export const useChartFilter = () => {
|
||||
'x-decorator': 'ChartFilterFormItem',
|
||||
'x-data-source': dataSource,
|
||||
'x-collection-field': `${fieldName}.${field.name}`,
|
||||
...defaultOperator?.schema,
|
||||
'x-component-props': {
|
||||
utc: false,
|
||||
underFilter: true,
|
||||
...field.uiSchema?.['x-component-props'],
|
||||
component: defaultOperator?.schema?.['x-component'],
|
||||
'filter-operator': defaultOperator,
|
||||
'data-source': dataSource,
|
||||
'collection-field': `${fieldName}.${field.name}`,
|
||||
@ -195,14 +194,15 @@ export const useChartFilter = () => {
|
||||
'x-settings': 'chart:filterForm:item',
|
||||
'x-toolbar': 'ChartFilterItemToolbar',
|
||||
'x-decorator': 'ChartFilterFormItem',
|
||||
'x-component': 'CollectionField',
|
||||
'x-data-source': dataSource,
|
||||
'x-collection-field': `${fieldName}.${child.name}`,
|
||||
...child.schema,
|
||||
title,
|
||||
...defaultOperator?.schema,
|
||||
'x-component-props': {
|
||||
utc: false,
|
||||
underFilter: true,
|
||||
component: defaultOperator?.schema?.['x-component'],
|
||||
'filter-operator': defaultOperator,
|
||||
'data-source': dataSource,
|
||||
'collection-field': `${fieldName}.${child.name}`,
|
||||
|
@ -56,6 +56,7 @@ function useFieldComponentName(): string {
|
||||
const map = {
|
||||
// AssociationField 的 mode 默认值是 Select
|
||||
AssociationField: 'Select',
|
||||
'DatePicker.FilterWithPicker': 'DatePicker',
|
||||
};
|
||||
const fieldComponentName =
|
||||
fieldSchema?.['x-component-props']?.['mode'] ||
|
||||
@ -163,15 +164,15 @@ const EditOperator = () => {
|
||||
|
||||
const setOperatorComponent = (operator: any, component: any, props = {}) => {
|
||||
const componentProps = field.componentProps || {};
|
||||
field.component = component;
|
||||
field.componentProps = {
|
||||
...componentProps,
|
||||
component,
|
||||
'filter-operator': operator,
|
||||
...props,
|
||||
};
|
||||
fieldSchema['x-component'] = component;
|
||||
fieldSchema['x-component-props'] = {
|
||||
...fieldSchema['x-component-props'],
|
||||
component,
|
||||
'filter-operator': operator,
|
||||
...props,
|
||||
};
|
||||
@ -179,9 +180,9 @@ const EditOperator = () => {
|
||||
dn.emit('patch', {
|
||||
schema: {
|
||||
'x-uid': fieldSchema['x-uid'],
|
||||
'x-component': component,
|
||||
'x-component-props': {
|
||||
...fieldSchema['x-component-props'],
|
||||
component,
|
||||
'filter-operator': operator,
|
||||
...props,
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user