Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make a modal route mount last #33

Open
CptMaumau opened this issue Nov 15, 2018 · 1 comment
Open

Make a modal route mount last #33

CptMaumau opened this issue Nov 15, 2018 · 1 comment

Comments

@CptMaumau
Copy link

Hi, would it be possible to make a ModalRoute always mount last via a prop?
For example for when you need the modal behind to finish loading before mounting the front one.

@davidmfoley
Copy link
Owner

The stacking order is controlled by:

  1. For <Modal> components, one can specify stackOrder -- see: https://github.com/davidmfoley/react-router-modal#modal. If not specified, the modals will be stacked in the order that they mount.

  2. If you have two or more <ModalRoute> components mounted, they are stack-ordered based on the length of the match to the location: so that a ModalRoute that matches /foos/42/details sits "on top" of one that matches just /foos/42.

What is the behavior you are seeing? If you post a code example perhaps I can help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants