fix(demos): action page
This commit is contained in:
parent
9fc634ecf2
commit
998afa2450
@ -1,6 +1,6 @@
|
|||||||
import { FormItem, Input } from '@formily/antd';
|
import { FormItem, Input } from '@formily/antd';
|
||||||
import { Field } from '@formily/core';
|
import { Field } from '@formily/core';
|
||||||
import { ISchema, observer, useField, useForm } from '@formily/react';
|
import { ISchema, observer, useField, useFieldSchema, useForm } from '@formily/react';
|
||||||
import { Action, Form, SchemaComponent, SchemaComponentProvider, useActionContext } from '@nocobase/client';
|
import { Action, Form, SchemaComponent, SchemaComponentProvider, useActionContext } from '@nocobase/client';
|
||||||
import { Select } from 'antd';
|
import { Select } from 'antd';
|
||||||
import React, { useRef } from 'react';
|
import React, { useRef } from 'react';
|
||||||
@ -20,6 +20,7 @@ const useCloseAction = () => {
|
|||||||
|
|
||||||
const Editable = observer((props) => {
|
const Editable = observer((props) => {
|
||||||
const field = useField<Field>();
|
const field = useField<Field>();
|
||||||
|
const schema = useFieldSchema();
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div style={{ marginBottom: 24 }}>
|
<div style={{ marginBottom: 24 }}>
|
||||||
@ -29,6 +30,7 @@ const Editable = observer((props) => {
|
|||||||
style={{ width: 100 }}
|
style={{ width: 100 }}
|
||||||
onChange={(value) => {
|
onChange={(value) => {
|
||||||
field.componentProps.openMode = value;
|
field.componentProps.openMode = value;
|
||||||
|
schema['x-component-props']['openMode'] = value;
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Select.Option value={'drawer'}>Drawer</Select.Option>
|
<Select.Option value={'drawer'}>Drawer</Select.Option>
|
||||||
|
Loading…
Reference in New Issue
Block a user