If I open modal1, modal2, modal3. On modal3 I decided to dismiss all previous modals.
How can I dismiss all previous modals (modal3-modal2-modal1) ?
If I open modal1, modal2, modal3. On modal3 I decided to dismiss all previous modals.
How can I dismiss all previous modals (modal3-modal2-modal1) ?
You need to store a reference to each modal in an array, so that you can reference them, and thus close them.