-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
I got a problem when i use Popup #1583
Comments
官方 Demo 都是没问题的,请检查你的代码,给出可复现的 demo。https://github.com/ant-design/ant-design-mobile/blob/master/components/popup/demo/basic.tsx#L52
已知问题,目前的解决方案是你使用 PopupContainer, 未来的解决方案请关注 #1125 |
@paranoidjk 这个popupcontainer怎么用的,不是popup.show里面用吧? |
@cielu 就像官方的 Popup 一样,https://github.com/ant-design/ant-design-mobile/blob/97c45b1fa06c14ca137e64753f1997bbea6e7d5e/components/popup/index.tsx#L3, 意思是你基于我们的 PopupContainer 实现一个带有你业务逻辑的你私人版本的 Popup |
哦哦,我试试,多谢 |
@paranoidjk 太麻烦了,我还是直接用modal实现吧。。。 |
@cielu 你的代码无法复选,我 review 了代码也没问题。 |
Version
1.4.2
Environment
react-native@0.44.3
Reproduction link
https://github.com/ant-design/ant-design-mobile/
Steps to reproduce
touch a button , and fire Popup.show() funtion
What is expected?
2.when state changed , the component in Popup could refresh
What is actually happening?
1.set maskClosable et true , then click the mask , but the Popup could'n hide .
2.When state changed , the component in Popup didn't refresh , but if I hide the popup then show it , the component refreshed
第一个是我点蒙层的时候弹出层不能隐藏。。。
第二个是我需要在弹出层组件里做一个判断,根据state的值来展示不通的components, 但是 一旦 popup show了,里面的组件是不会被改变的,只有等hide之后再重新show才会显示。。。不知道有没有方法可以让popup在每次state值被改变之后都渲染一次。。。就像render一样
The text was updated successfully, but these errors were encountered: