mui / toolpad

Toolpad: Full stack components and low-code builder for dashboards and internal apps.
https://mui.com/toolpad/
MIT License
1.02k stars 264 forks source link

displayPrint on dashboardLayout Menu and AppBar #4190

Open ebengtso opened 1 week ago

ebengtso commented 1 week ago

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

Janpot commented 1 week ago

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.