Browse Source

Update index.en-US.md

pull/22950/head
偏右 5 years ago
committed by GitHub
parent
commit
6fc0ca089e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      components/form/index.en-US.md

4
components/form/index.en-US.md

@ -308,9 +308,9 @@ validator(rule, value, callback) => {
Before Modal open, children elements do not exist in the view. You can set `forceRender` on Modal to pre-render its children. Click [here](https://codesandbox.io/s/antd-reproduction-template-ibu5c) to view an example.
### 为什么 Form.Item 下的子组件 defaultValue 不生效?
### Why component `defaultValue` not working when inside Form.Item?
当你为 Form.Item 设置 `name` 属性后,子组件会转为受控模式。因而 `defaultValue` 不会生效。你需要在 Form 上通过 `initialValues` 设置默认值。
Components inside Form.Item with name property will turn into controlled mode, that makes `defaultValue` does not work anymore. Please try `initialValues` of Form to set default value.
<style>
.site-form-item-icon {

Loading…
Cancel
Save