mui-datatables
mui-datatables copied to clipboard
fix: hide column in print mode when `print: false`
This is my attempt at fixing https://github.com/gregnb/mui-datatables/issues/1913. I'm not sure @global is actually supported by tss-react, so I rewrote this part without using it. Not sure if that's the best way to do it, any suggestions are welcome 🙂
I also unfortunately wasn't able to run tests locally, when running tests locally with npm test I get this error:
TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at Object.help (/Users/anya/mui-datatables/node_modules/yargs/lib/usage.js:240:22)
at Object.self.showHelp (/Users/anya/mui-datatables/node_modules/yargs/lib/usage.js:432:15)
at Array.<anonymous> (/Users/anya/mui-datatables/node_modules/mocha/lib/cli/cli.js:53:13)
at Object.fail (/Users/anya/mui-datatables/node_modules/yargs/lib/usage.js:41:17)
at /Users/anya/mui-datatables/node_modules/yargs/lib/command.js:246:36
at processTicksAndRejections (node:internal/process/task_queues:96:5)
So I just tested this manually on the "Hide Columns Print" example, here's how it looks like in print mode.
Before:

After:

This looks like a good change to me. We recently had the jsdom could not parse CSS stylesheet error come up, and it ended up having the @global string in the generated css during a test. We eventually traced it back to mui-datatables and to the previously filed issue.
Nice! It would be amazing to get that pesky "jsdom could not parse CSS stylesheet" out of my console haha. Any ETA to merge?
@wdh2100 Anyway we could get this merged in soon?
@aaneitchik Can you try and add @wdh2100 as a reviewer that might get his attention?
@Npervic Unfortunately I can't: the button to request a review doesn't show up where it should be, so looks like I don't have the permissions to do it.
@Npervic Unfortunately I can't: the button to request a review doesn't show up where it should be, so looks like I don't have the permissions to do it.
That's to bad but thanks for trying, I'l keep reaching out.