fix: dynamic component

This commit is contained in:
chenos 2022-04-07 20:31:06 +08:00
parent 3e574662cb
commit c8b100e390
2 changed files with 2 additions and 8 deletions

View File

@ -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);
}, },

View File

@ -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);
}; };