teodosii / react-notifications-component

Delightful and highly customisable React Component to notify your users
https://teodosii.github.io/react-notifications-component/
MIT License
1.27k stars 73 forks source link

Prevent onTransitionEnd to be called multiple times #156

Closed tkirda closed 2 years ago

tkirda commented 2 years ago

I have and issue where setting pauseOnHover has no effect. After spending some time to determine where the issues is, i identified, that this is due to onTransitionEnd called twice. This creates new timer and even if you try to pause time during mouse over, old timer keeps running and closes the notification.

This PR prevent onTransitionEnd to be called twice. Otherwise it has no other side effects. I would appreciate if this could be merged and patch version released.

Thanks!

tkirda commented 2 years ago

onTransitionEnd is fired for each transition property and in our case we use height and opacity transitions.

tkirda commented 2 years ago

@teodosii Any updates regarding this PR?

pauliusg commented 2 years ago

+1

teodosii commented 2 years ago

Hi! Sorry for delayed response, I just didn't see the notification in time. I'll add it now, thanks for the PR! @tkirda