fix(plugin-fm): drawer form values (#1259)
This commit is contained in:
parent
9285a8b6a2
commit
9e9688fa5b
@ -11,7 +11,6 @@ const schema = {
|
|||||||
type: 'string',
|
type: 'string',
|
||||||
'x-decorator': 'FormItem',
|
'x-decorator': 'FormItem',
|
||||||
'x-component': 'Input',
|
'x-component': 'Input',
|
||||||
default: 'uploads',
|
|
||||||
},
|
},
|
||||||
path: {
|
path: {
|
||||||
title: '{{t("Path")}}',
|
title: '{{t("Path")}}',
|
||||||
@ -143,14 +142,12 @@ export const StorageOptions = observer((props) => {
|
|||||||
const field = useField<Field>();
|
const field = useField<Field>();
|
||||||
const [s, setSchema] = useState(new Schema({}));
|
const [s, setSchema] = useState(new Schema({}));
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
form.clearFormGraph('options.*');
|
// form.clearFormGraph('options.*');
|
||||||
setSchema(new Schema(schema[form.values.type] || {}));
|
setSchema(new Schema(schema[form.values.type] || {}));
|
||||||
}, [form.values.type]);
|
}, [form.values.type]);
|
||||||
return (
|
return (
|
||||||
<div>
|
|
||||||
<FormLayout layout={'vertical'}>
|
<FormLayout layout={'vertical'}>
|
||||||
<RecursionField key={form.values.type || 'local'} basePath={field.address} onlyRenderProperties schema={s} />
|
<RecursionField key={form.values.type || 'local'} basePath={field.address} onlyRenderProperties schema={s} />
|
||||||
</FormLayout>
|
</FormLayout>
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user