Closed syedirfan33 closed 5 years ago
Hey @syedirfan33! May I ask which version of the library are you using?
Hey @CharlesMangwa , I am using "react-native-modalfy": "^1.0.0-beta.0",
OK got it. Just to understand your issue a bit better I'd have a few questions:
'NewOrderPost'
using the same component?'NewOrderPost'
?Yes, I had opened 'NewOrderPre ' before and would need to open 'NewOrderPost' upon clicking 'confirm' button of 'NewOrderPre'
I have only these two 2 modals in stack. const modalConfig = { NewOrderPre, NewOrderPost, };
Gotcha! So NewOrderPre
and NewOrderPost
are using 2 different components under the hood? (could you provide a small reproducible example on Snack plz? Would make it easier to help you as best as I can).
Hi @CharlesMangwa , sure. I Will do. NewOrderPost and NewOrderPre are two differet compoents.
meanwhile Could you please let me know how can I close current modal upon performing some actions?
Oh my bad @syedirfan33! After reading your initial message again I think I've found where your issue might come from: you wrote closeModal;
instead of actually calling the function via closeModal();
, that's why nothing is happening.
Omg it's working, thanks a lot!!
I am opening an modal upon pressing a button from another modal and would need to close previously opened modal.
Please assist. below code doesn't work.
<Button onPress={this.confirmOrder} title="CONFIRM" />
confirmOrder = () => { const { modal: { openModal, closeModal }, } = this.props; closeModal; openModal('NewOrderPost'); };