Merge branch 'next' into develop

This commit is contained in:
nocobase[bot] 2025-01-16 13:17:33 +00:00
commit 6e0f198d6f
2 changed files with 7 additions and 0 deletions

View File

@ -137,6 +137,9 @@ const EditOperator = () => {
const operator = fieldSchema['x-component-props']?.['filter-operator']; const operator = fieldSchema['x-component-props']?.['filter-operator'];
const setOperatorComponent = (operator: any, component: any, props = {}) => { const setOperatorComponent = (operator: any, component: any, props = {}) => {
if (component === 'DatePicker.FilterWithPicker') {
component = 'DatePicker';
}
const componentProps = field.componentProps || {}; const componentProps = field.componentProps || {};
field.component = component; field.component = component;
field.componentProps = { field.componentProps = {
@ -150,6 +153,7 @@ const EditOperator = () => {
'filter-operator': operator, 'filter-operator': operator,
...props, ...props,
}; };
fieldSchema['x-filter-operator'] = operator?.value;
dn.emit('patch', { dn.emit('patch', {
schema: { schema: {
'x-uid': fieldSchema['x-uid'], 'x-uid': fieldSchema['x-uid'],
@ -159,6 +163,7 @@ const EditOperator = () => {
'filter-operator': operator, 'filter-operator': operator,
...props, ...props,
}, },
'x-filter-operator': operator?.value,
}, },
}); });
}; };

View File

@ -138,6 +138,7 @@ export const useChartFilter = () => {
...field.uiSchema?.['x-component-props'], ...field.uiSchema?.['x-component-props'],
'filter-operator': defaultOperator, 'filter-operator': defaultOperator,
}, },
'x-filter-operators': defaultOperator?.value,
}; };
if (field.interface === 'formula') { if (field.interface === 'formula') {
const component = getFormulaComponent(field.dataType) || 'Input'; const component = getFormulaComponent(field.dataType) || 'Input';
@ -195,6 +196,7 @@ export const useChartFilter = () => {
'x-component-props': { 'x-component-props': {
'filter-operator': defaultOperator, 'filter-operator': defaultOperator,
}, },
'x-filter-operators': defaultOperator?.value,
}; };
if (defaultOperator?.noValue) { if (defaultOperator?.noValue) {
schema = { schema = {