ant-design/components/form/demo/dep-debug.md
afc163 76434a15df
chore(🆙): upgrade devDeps (#29418)
* chore(🆙): upgrade devDeps

* prettier code

* fix dnd demo

* fix react-dnd demo

* fix npm start and demo tsx compile

* fix snapshot
2021-02-23 10:45:11 +08:00

797 B

order title debug
99
zh-CN en-US
Dep Debug Dep Debug
true

zh-CN

Buggy!

en-US

Buggy!

import { Form, Input } from 'antd';

let acc = 0;

const Demo = () => {
  const [form] = Form.useForm();
  return (
    <Form
      form={form}
      name="debug"
      initialValues={{
        debug1: 'debug1',
        debug2: 'debug2',
      }}
    >
      <Form.Item noStyle dependencies={['debug1']}>
        {
          () => acc++
          // return <pre>{JSON.stringify(form.getFieldsValue(), null, 2)}</pre>;
        }
      </Form.Item>
      <Form.Item label="debug1" name="debug1">
        <Input />
      </Form.Item>
      <Form.Item label="debug2" name="debug2">
        <Input />
      </Form.Item>
    </Form>
  );
};

ReactDOM.render(<Demo />, mountNode);