Problem with picker and react 18.0.0

When using newly released react 18.0.0 there is a problem that views will not be removed after animation is done in the picker when selecting a year and month. Attaching a gif that hopefully shows it.

What can be seen is that the elements that are animated out are not removed as they should.

If toggling the animation off/on in the inspector the element is removed. So the onAnimationEnd event is not triggered first time? Maybe some kind of race where the animation starts before the listener is adder or something.

Hi @David_Erenger

Thanks a lot for reporting this issue. I can confirm that I could reproduce this and created a bug report, so our team investigates this further.

Hello @David_Erenger :wave:

Good news: we have shipped Mobiscroll 5.16, where we fixed an issue in React 18, where the year and multi-year views were not correctly removed from the markup after animation. This made the component unusable.

Here you can find a guide of how you can update the Mobiscroll version to the latest: https://docs.mobiscroll.com/update-version.

Hi,

I have just tested the new version and the problem is still there for me, no difference

Hello @David_Erenger :wave:

Sorry about that! - however, I just tried and was not able to reproduce with the latest 5.16.
This issue only occurred if I downgraded to 5.15.x.

Can you share a working example from which we can reproduce this issue? It would be better if you contact us directly from your licensed Account–>My Support Tickets–>New Support Ticket. Thanks!

Hi,

I tested again with a fresh download of the source and can confirm that it actually is solved :slight_smile: Sorry for the confusion, I dont know what diffed from previous attempt. I confirmed that all my custom fixes where gone but maybe didn’t download the correct version or something!

Anyway, great that you solved it so fast :clap:

Hello @David_Erenger :wave:

No worries, thanks for clarifying!