[data grid] Cannot print without footer #14861
Labels
bug 🐛
Something doesn't work
component: data grid
This is the name of the generic UI component, not the React module!
feature: Export
Steps to reproduce
Link to live example: https://stackblitz.com/edit/github-kbnsbh?file=src%2Fdemo.tsx
Steps:
DataGrid
component with propertyhideFooter={true}
GridToolbarExport
component withoutprintOptions={{ hideFooter: true}}
Current behavior
Print window does not open, error about missing footer element instead
Expected behavior
Print window opens
Context
When the print window is opened, properties are assigned to a missing footer element. I guess there should be a check if the footer actually exists before the following lines 189-191:
mui-x/packages/x-data-grid/src/hooks/features/export/useGridPrintExport.tsx
Lines 181 to 192 in 7bd05d2
Compare to where the
hideFooter
option is applied and the footer is only removed if it exists:mui-x/packages/x-data-grid/src/hooks/features/export/useGridPrintExport.tsx
Lines 166 to 169 in 7bd05d2
Your environment
Search keywords: DataGrid Print
The text was updated successfully, but these errors were encountered: