fix(layout): don't leave a wrapping parent at the end of a page with only its fixed child - #3484
fix(layout): don't leave a wrapping parent at the end of a page with only its fixed child#3484zewish wants to merge 1 commit into
Conversation
…only its fixed child
🦋 Changeset detectedLatest commit: 2dcb963 The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Hey @diegomura, I would love if you're able to give me some feedback if this PR is useful to the project or not. |
Hey @zewish . Not sure how this is the expected result if the fixed view of height 20 fits in the 1st page |
|
Thanks for the feedback. We have since switched to a different PDF generation approach which doesn’t use react-pdf at all, so we no longer have need for this patch anyways. |
Summary
Found this while exporting a print menu, where a heading was alone at the bottom of one page and appeared again above its products on the next one. We use a patch-package patch until this is (hopefully 🤞) merged and released.
Minimal reproduction
The page is 300pt tall and the first block takes 255pt of it. That leaves 45pt, which is
enough for the 20pt header but not for the 40pt row after it.
Old behavior:
New behavior: