From 61aac68028050fdb29ed08418af908b603d78736 Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 24 Aug 2017 09:44:17 +0800 Subject: [PATCH] doc: remove new key way --- components/modal/index.en-US.md | 12 +----------- components/modal/index.zh-CN.md | 12 +----------- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/components/modal/index.en-US.md b/components/modal/index.en-US.md index 99c144859f..005922e014 100644 --- a/components/modal/index.en-US.md +++ b/components/modal/index.en-US.md @@ -37,17 +37,7 @@ and so on. #### Destroy on close > The state of Modal will be preserved at it's component lifecircle. -> If you wish to open it with brand new state everytime, you need to reset state manually. Or simply [give a new key](https://github.com/ant-design/ant-design/issues/4165) to Modal when visible is changed to `true`, React will treat it as a new component. - -> ```jsx -> -> ``` - -> Another way is to conditionally mount modal. - -> ```jsx -> {this.state.visible && } -> ``` +> If you wish to open it with brand new state everytime, you need to reset state manually. ### Modal.method() diff --git a/components/modal/index.zh-CN.md b/components/modal/index.zh-CN.md index 637fe7b281..539ce875c1 100644 --- a/components/modal/index.zh-CN.md +++ b/components/modal/index.zh-CN.md @@ -36,17 +36,7 @@ title: Modal #### 清空旧数据 > `` 组件有标准的 React 生命周期,关闭后状态不会自动清空。 -> 如果希望每次打开都是新内容,需要自行手动清空旧的状态。或者打开时给 Modal 设置一个[全新的 key](https://github.com/ant-design/ant-design/issues/4165), React 会渲染出一个全新的对话框。 - -> ```jsx -> -> ``` - -> 另一种方式是根据条件加载 Modal。 - -> ```jsx -> {this.state.visible && } -> ``` +> 如果希望每次打开都是新内容,需要自行手动清空旧的状态。 ### Modal.method()