fix: dynamic component
This commit is contained in:
parent
3e574662cb
commit
c8b100e390
@ -43,7 +43,7 @@ export const FilterItem = observer((props: any) => {
|
|||||||
{!operator?.noValue &&
|
{!operator?.noValue &&
|
||||||
React.createElement(DynamicComponent, {
|
React.createElement(DynamicComponent, {
|
||||||
value,
|
value,
|
||||||
schema: {},
|
schema,
|
||||||
onChange(value) {
|
onChange(value) {
|
||||||
setValue(value);
|
setValue(value);
|
||||||
},
|
},
|
||||||
|
@ -44,13 +44,7 @@ export const useValues = () => {
|
|||||||
field.data.dataIndex = dataIndex;
|
field.data.dataIndex = dataIndex;
|
||||||
field.data.operators = operators;
|
field.data.operators = operators;
|
||||||
field.data.operator = operator;
|
field.data.operator = operator;
|
||||||
field.data.schema = merge(merge(option?.schema, operator?.schema), {
|
field.data.schema = merge(option?.schema, operator?.schema);
|
||||||
'x-component-props': {
|
|
||||||
style: {
|
|
||||||
minWidth: 150,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
field.data.value = get(field.value, `${fieldPath}.$${operatorValue}`);
|
field.data.value = get(field.value, `${fieldPath}.$${operatorValue}`);
|
||||||
console.log('option', operator, field.data.value);
|
console.log('option', operator, field.data.value);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user