Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Notification doesn't close itself after 4.5s #5869

Closed
gudh opened this issue Apr 24, 2017 · 8 comments
Closed

Docs: Notification doesn't close itself after 4.5s #5869

gudh opened this issue Apr 24, 2017 · 8 comments

Comments

@gudh
Copy link

gudh commented Apr 24, 2017

First of all, thanks for building antd, I am amazed at how FANTASTIC it is! 馃尫

Version

2.9.2

Environment

lastest MacOS, Chrome

Reproduction link

https://ant.design/components/notification/

Steps to reproduce

It's in the online docs

What is expected?

It should close itself after 4.5s

What is actually happening?

Notification doesn't close itself after 4.5s

Keep up great work! 鉂わ笍

@gudh gudh changed the title Notification doesn't close itself after 4.5s Docs: Notification doesn't close itself after 4.5s Apr 24, 2017
@benjycui
Copy link
Contributor

@afc163 close this issue?

@afc163 afc163 closed this as completed Apr 24, 2017
@afc163
Copy link
Member

afc163 commented Apr 24, 2017

Fixed in 2.9.3

@AsceticBoy
Copy link

AsceticBoy commented Jul 6, 2017

online example, if you click several times frequently, after 4.5 secs, you will see after all Notifications close, have one Notification open again! I find component will in DidMount inject timer again @afc163 @benjycui

@afc163
Copy link
Member

afc163 commented Jul 6, 2017

@AsceticBoy You can file a new issue about it.

@afc163
Copy link
Member

afc163 commented Jul 7, 2017

@AsceticBoy I just revert react-component/notification#17 and released in rc-notification@2.0.2, you can try to reinstall node_modules.

cc @paranoidjk

@paranoidjk
Copy link
Contributor

hmm... intersting bug 馃槄 I wonder why

@AsceticBoy
Copy link

AsceticBoy commented Jul 7, 2017

A intersting bug, when set animateProps.component = '', it will find children[0] to return , so it will come DidMount to register Timer! Thx @afc163 resolve my problem

@paranoidjk
Copy link
Contributor

The reason is animateProps.component changed when destroy the last but one notification instance, which caused the rc-animate root component tree rerendered, so the last notification actually is a totally new instance, so the timer is a restarted new timer too.

@afc163 But revert this will have influence on ant-design/ant-design-mobile#1389, please fix this or release rc-notication as a major upgrade.

afc163 added a commit to ant-design/ant-design-mobile that referenced this issue Jul 7, 2017
paranoidjk pushed a commit to ant-design/ant-design-mobile that referenced this issue Jul 8, 2017
cncolder pushed a commit to cncolder/ant-design-mobile that referenced this issue Jul 12, 2017
cncolder pushed a commit to cncolder/ant-design-mobile that referenced this issue Jul 12, 2017
lixiaoyang1992 pushed a commit to lixiaoyang1992/ant-design-mobile that referenced this issue Apr 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants