Is there a way to ensure that the material-ui AppBar remains fixed at the top while being wrapped with page contents in a transition? I want the AppBar to transition (e.g. Zoom or Slide) along with the rest of the page contents.
I encountered this issue when attempting to use the material-ui Dialog component in fullScreen mode. When the page content is tall enough to create a scrollbar, the AppBar within the Dialog scrolls off the page, despite having its position set to fixed
.
To replicate the problem, click here (https://codesandbox.io/s/2471jyxxkr) and open the FULLSCREEN DIALOG, then scroll down. Alternatively, visit this link (https://codesandbox.io/s/lrxv6w43y9) and scroll down. How can I prevent the AppBar from scrolling and keep it at the top?
A possible workaround could involve conditionally rendering an AppBar during the transition, hiding it once the transition is complete, and showing another outside the transition. However, this solution seems like a hack.
I am willing to utilize an npm module that facilitates smooth page transitions.
I came across a solution with a pre-v1 version of Material-Ui here (https://www.npmjs.com/package/material-ui-fullscreen-dialog-transition-fix), but I'm looking for something compatible with > v1 if feasible.
Although it appears promising, this resource mentions incomplete support for React Router v4. https://github.com/trungdq88/react-router-page-transition (however, it might be compatible enough https://github.com/trungdq88/react-router-page-transition#using-with-react-router-4)
For more information, refer to https://github.com/mui-org/material-ui/issues/12096