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

[DataGridPro] Fix the height of the printed container #3879

Closed
wants to merge 4 commits into from

Conversation

flaviendelangle
Copy link
Member

@flaviendelangle flaviendelangle commented Feb 7, 2022

Fixes #3820
Preview

@flaviendelangle flaviendelangle added bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! feature: Export feature: Tree data Related to the data grid Tree data feature labels Feb 7, 2022
@flaviendelangle flaviendelangle self-assigned this Feb 7, 2022
@mui-bot
Copy link

mui-bot commented Feb 7, 2022

These are the results for the performance tests:

Test case Unit Min Max Median Mean σ
Filter 100k rows ms 204.4 368 295.9 277.06 62.824
Sort 100k rows ms 339.9 846 610.9 606.34 166.09
Select 100k rows ms 139 283.1 181.1 185.9 51.8
Deselect 100k rows ms 95.6 200.3 200.3 137.32 44.783

Generated by 🚫 dangerJS against dfa1578

@siriwatknp
Copy link
Member

siriwatknp commented Feb 8, 2022

👋 The migration PR has been merged.

Please follow these steps to make sure that the contents are all updated. (Sorry for the inconvenience)

  1. pull latest master from upstream to your branch
  2. if your PR has changes on the *.md or demo files, you are likely to encounter conflict because all of them have been moved to the new folder.
    2.1 revert the change on those markdown files you did
    2.2 pull latest master from upstream (you should not see conflict)
    2.3 make the changes again at docs/data/data-grid/*
  3. run yarn docs:api
    • you might see the changes in docs/pages/x/api/data-grid/* if your PR touches some of the components
    • it is okay if there is no changes

If you are struggle with the steps above, feel free to tag @siriwatknp

@flaviendelangle
Copy link
Member Author

@alexfauquette I struggle to reproduce your issue
But we were using the wrong selector to set the page size, it should have been the top level row count.
Can you tell me if the preview still have your bug ?

@alexfauquette
Copy link
Member

Yes, the bug is still here. I made the same codesandbox from your PR:
https://codesandbox.io/s/treedatafullexample-material-demo-forked-pg2db?file=/demo.j

For the bug to occur, you need to open some rows. The more you open, the easiest it is to observe. In the recording, the last row is "Alta Howard (26)". First with open rows it does not appears in the print. If I close them, It appears

Peek 2022-02-10 14-42

@flaviendelangle
Copy link
Member Author

flaviendelangle commented Feb 10, 2022

@alexfauquette weird, if I open one row or even two rows, I still have the last row visible on the print

EDIT: I tried openeing 4 rows and got half of the last row cut.
I will investigate.
I suppose the problem comes from breakInside: 'avoid'
If the print let a few white pixels at the bottom of the page to avoid cuting a row, it's pixels that will we cut out at the bottom.
I reproduce the exact same problem without any Tree Data enabled.

@flaviendelangle flaviendelangle added the on hold There is a blocker, we need to wait label Feb 11, 2022
@github-actions
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Feb 17, 2022
@flaviendelangle flaviendelangle changed the title [DataGridPro] Fix amount of printed rows with the Tree Data [DataGridPro] Fix the height of the printed container Feb 24, 2022
@DanailH DanailH changed the base branch from master to next September 12, 2022 13:09
@DanailH
Copy link
Member

DanailH commented Sep 12, 2022

@flaviendelangle that one has been sitting in draft since February. Can we close it?

@flaviendelangle
Copy link
Member Author

@DanailH at some point I proposed you to have a look but I think we both forgot 😆
It would be nice to find a solution

@DanailH
Copy link
Member

DanailH commented Sep 12, 2022

@flaviendelangle thanks for the reminder. That does sound logical.

@flaviendelangle flaviendelangle deleted the tree-data-print branch November 20, 2023 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! feature: Export feature: Tree data Related to the data grid Tree data feature on hold There is a blocker, we need to wait PR: out-of-date The pull request has merge conflicts and can't be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DataGridPro] Print export does not work well with the tree data
5 participants