-
-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
为什么 DialogWrap unmount 的时候还要再去检查 visiable 并 render 一次 Dialog? #18
Comments
yesmeck
changed the title
为什么 componentWillUnmount 的时候还要去检查 visiable 再 render 一次 Dialog
为什么 DialogWrap unmount 的时候还要去检查 visiable 再 render 一次 Dialog
Mar 14, 2016
yesmeck
changed the title
为什么 DialogWrap unmount 的时候还要去检查 visiable 再 render 一次 Dialog
为什么 DialogWrap unmount 的时候还要再去检查 visiable 并 render 一次 Dialog
Mar 14, 2016
yesmeck
changed the title
为什么 DialogWrap unmount 的时候还要再去检查 visiable 并 render 一次 Dialog
为什么 DialogWrap unmount 的时候还要再去检查 visiable 并 render 一次 Dialog?
Mar 14, 2016
我知道了,是为了显示关闭动画吧。但是这样的话在使用 |
用 ref function |
|
试下 这种,没问题的
|
嗯,这样没问题了 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
这里 https://github.com/react-component/dialog/blob/master/src%2FDialogWrap.jsx#L53-L58
我想自己去 unmount
DialogWrap
(不改变 visible),但是发现这里如果visible: true
的会再次 renderDialog
,这时如果在DialogWrap
的 children 里有用ref
的话 react 就会报错。例子:http://codepen.io/yesmeck/pen/ONRvrz?editors=0010
打开 modal 后点击关闭就会报错。
The text was updated successfully, but these errors were encountered: