- I have searched the issues of this repository and believe that this is not a duplicate.
Reproduction link
Steps to reproduce
//操作:1 打开弹窗
// 2. 点击show message
// 3. 点击ok 关闭弹窗
// 4. 打开弹窗
// 5. 点击show message
What is expected?
message正常显示
What is actually happening?
message未正常显示
建议: 在rc-notification,对于返回的notificationInstance对象添加判断方法,如
messageWrapperExit() {
if (getContainer) {
const root = getContainer();
return root.contains(div);
}
return document.body.contains(div);
}
并且在上层message组件中添加是否新创建 实例的判断
if (messageInstance && msgInstance.messageWrapperExit()) {
callback({ prefixCls, rootPrefixCls, iconPrefixCls, instance: messageInstance });
return;
}
| Environment | Info |
| ------------ | ------------ |
| antd | 4.18.4 |
| React | react-dom16.X.X |
| System | macos |
| Browser | chrome |
5条答案
按热度按时间vyswwuz21#
你的 CodeSandbox 里什么都没有捏
kt06eoxx2#
Hello @TiamoJrZhang. Please provide a online reproduction by forking this link https://u.ant.design/codesandbox-repro or a minimal GitHub repository. Issues labeled by
Need Reproduce
will be closed if no activities in 3 days.你好 @TiamoJrZhang, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击 此处 创建一个 codesandbox 或者提供一个最小化的 GitHub 仓库。3 天内未跟进此 issue 将会被自动关闭。
3phpmpom3#
抱歉,看下这个可以么 https://codesandbox.io/s/antd-reproduction-template-forked-2q52f?file=/index.js
o8x7eapl4#
rc-notification commit the pr to solve it and add test.
wfypjpf45#
why all of antd message tests failed when npm link rc-notification,even if rc-notification code is not update