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

displayPrint on dashboardLayout Menu and AppBar #4190

Closed
ebengtso opened this issue Oct 5, 2024 · 4 comments · Fixed by #4334
Closed

displayPrint on dashboardLayout Menu and AppBar #4190

ebengtso opened this issue Oct 5, 2024 · 4 comments · Fixed by #4334
Assignees
Labels
component: layout This is the name of the generic UI component, not the React module! enhancement This is not a bug, nor a new feature scope: toolpad-core Abbreviated to "core"

Comments

@ebengtso
Copy link

ebengtso commented Oct 5, 2024

Summary

Elements of the DashboardLayout should not printed when the page is printed

I have tried to use the displayPrint, but it is ignored.

<DashboardLayout sx={{ displayPrint: 'none' }}>
  <Box sx={{m:1, displayPrint: 'block'}}>
    {children}
  </Box>
</DashboardLayout>

I have also tried to use a customClass, but in this case the space occupied by the dashboard menu and appbar turns to blank but occupies the space

@media print {
  .print {
    visibility: visible;

  }
  .notprint {
    visibility: hidden;
  }
}

Examples

No response

Motivation

No response

Search keywords: displayPrint, DashboardLayout

@ebengtso ebengtso added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Oct 5, 2024
@Janpot
Copy link
Member

Janpot commented Oct 7, 2024

I believe hiding the navigation in print should be the default behaviour. Let's do that for 0.9.0. We can then wait for use-cases to show it.

@Janpot Janpot added enhancement This is not a bug, nor a new feature component: DashboardLayout and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Oct 7, 2024
@Janpot Janpot moved this from Backlog to Planned in MUI Toolpad public roadmap Oct 7, 2024
@prakhargupta1 prakhargupta1 added the scope: toolpad-core Abbreviated to "core" label Oct 16, 2024
@apedroferreira
Copy link
Member

Fix incoming in #4334, but we've also already added an sx prop to DashboardLayout that might make it possible to do this manually.

@apedroferreira apedroferreira moved this from Planned to In progress in MUI Toolpad public roadmap Oct 29, 2024
@ebengtso
Copy link
Author

Great! This was quick! Using sx does not work because it applies to the itself and the children, including the page content

Thanks.

@github-project-automation github-project-automation bot moved this from In progress to Completed in MUI Toolpad public roadmap Oct 29, 2024
Copy link

This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

Note

@ebengtso How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey.

@oliviertassinari oliviertassinari added component: layout This is the name of the generic UI component, not the React module! and removed component: DashboardLayout labels Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: layout This is the name of the generic UI component, not the React module! enhancement This is not a bug, nor a new feature scope: toolpad-core Abbreviated to "core"
Projects
Status: Completed
Development

Successfully merging a pull request may close this issue.

5 participants