MUI Extended UI Components

Close On Navigation


HOC to enable components(especially the Material UI Modals) to close when browser is navigated back/forward

Usage

import { withCloseOnNavigation } from "mui-extended"; import { Dialog } from "@mui/material"; const NavigationClasableDialog = withCloseOnNavigation(Dialog);

withCloseOnNavigation
accepts any component with
open
and
onClose
props

Layout component uses

withCloseOnNavigation
for menu in Mobile mode

Features

  • Closes on navigating back
  • Closes on navigating forward (using links on Modal Component)

Note :

Demo
Does this page need improvements?
Edit This Page in GitHub
Did this page help you?
Provide feedback in the GitHub Discussion Page
Need More help?

Write an email to opensource@sodaru.com