Closed KestasVenslauskas closed 3 years ago
Hi @KestasVenslauskas, yes you can do so by defining:
modalOptions = {
backBehavior: 'none', // to disable back button & outside touches
disableFlingGesture: true, // optionally: to disable fling-to-close gesture
}
as explained in the docs: https://colorfy-software.gitbook.io/react-native-modalfy/api/types/modaloptions#backbehavior
Related: https://github.com/colorfy-software/react-native-modalfy/issues/87
Is it possible to have one modal with backBehavior: 'none'
without creating another stack just for this one?
Related: #87
Is it possible to have one modal with
backBehavior: 'none'
without creating another stack just for this one?
const modalConfig: ModalStackConfig = { ShareModal: { modal: ShareModal, position: 'bottom', backBehavior: 'none', // to disable back button & outside touches backdropColor: Colors.black, }, }; const defaultOptions: ModalOptions = { backdropOpacity: 0.3 };
const stack = createModalStack(modalConfig, defaultOptions);
Can we prevent modal from closing when touch outside happens? For example loading modal?