Open ekabolotina opened 5 years ago
I found this problem occurs in version 2.0.0-rc1 and later.
Thanks for the report.
@davidmfoley 👋 hello! Any progress on this? Or a possible solution we could implement on our end while waiting on a fix? I confirm, this issue isn't present on previous versions of the library, e.g 1.5.1
.
This is kind of a difficult one due to the portal lifecycle in react.
I hacked around the problem by copying the content (innerHTML
) that is rendered in the modal at the time the unmount begins, and then rendering that content statically during the transition out. I don't love this solution but it's better than a blank modal during the out transition. Let me know how it works for you. (v2.0.0rc3
or next
)
Hi everyone! Here is an example:
<ModalRoute component={Component} path="/path" />
<ModalContainer backdropClassName="modal__backdrop" modalClassName="modal modal_animation_to-right" modalInClassName="modal_in" modalOutClassName="modal_out" outDelay={30000} />
When navigate to
/path
modal getsmodal_in
class. Then click 'Back' button in browser => modal getsmodal_out
class andComponent
unmount immediately, then after 30000s modal unmounts too. Is it normal behavour? I expectComponent
to be unmounted at the same time with modal afteroutDelay
.Also the last modal unmounting without any delay specified in
outDelay
.Using