mui-datatables icon indicating copy to clipboard operation
mui-datatables copied to clipboard

`print: false` column option is not working

Open aaneitchik opened this issue 3 years ago • 1 comments

Expected Behavior

Table column should be hidden when printing if its print option is set to false (see docs)

Current Behavior

Setting print option to false has no effect, the column is visible when printing.

Steps to Reproduce (for bugs)

This bug can be reproduced on codesandbox where all examples are located.

  1. Go to https://codesandbox.io/s/github/gregnb/mui-datatables mentioned in the README
  2. Select "Hide Columns Print" example
  3. See how the table has 4 columns: Modified Title Label, Location, Age, Salary
  4. Click "Print" button
  5. See all 4 columns present in the print view, while according to the example source both Location and Age columns should've been hidden. Screenshot 2022-04-20 at 21 58 53

Your Environment

I am pretty sure this is related to this issue: https://github.com/gregnb/mui-datatables/issues/1886#issuecomment-1104304846, and was introduced during the move to tss-react: the CSS responsible for hiding the columns isn't properly created, causing the bug.

Tech Version
MUI-datatables 4.2.0
browser Chrome

aaneitchik avatar Apr 20 '22 20:04 aaneitchik

The problem still persists

Sukanyeah avatar Nov 17 '22 06:11 Sukanyeah