react-router-modal icon indicating copy to clipboard operation
react-router-modal copied to clipboard

Make a modal route mount last

Open CptMaumau opened this issue 6 years ago • 1 comments

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.

CptMaumau avatar Nov 15 '18 08:11 CptMaumau

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.

davidmfoley avatar Nov 20 '18 14:11 davidmfoley