mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-07 22:49:26 +08:00
Merge branch 'next' into develop
This commit is contained in:
commit
6e0f198d6f
@ -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,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -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 = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user