document-picker icon indicating copy to clipboard operation
document-picker copied to clipboard

react-native-document-picker and modals

Open QuevedoIB opened this issue 5 years ago • 2 comments

Just pointing out a problem I've faced, react-native-document-picker was freezing the app on calling .show() at iOS whenever a modal transition was still running.

A fast workaround was using a setTimeOut with the same timer as the transition duration.

QuevedoIB avatar Jun 18 '19 08:06 QuevedoIB

Is a setTimeout still the preferred solution to this? It seems a little bit hacky to me - if you change your transition duration later, you have to remember to update the timeout, otherwise a (potentially very important) part of your app might become inaccessible.

keithpickering avatar Jun 08 '22 18:06 keithpickering

Try to call it with Modal onDismiss. (ios only function)

Or you can draw your own modal with Portal with react-native-paper.

react-native modal behaviours is weird sometimes so I start to use Portal to draw all the modal components at the root of my app

vmia159 avatar Oct 18 '22 07:10 vmia159