-
I've got these long reports that have to loop over lots of data and display them in table format. How do I get the table header to not render by itself at the bottom of the page (with no item rows)? Page 1 demonstrates this as you'll see the table header rendered at the bottom of the page while the items that belong to that table get rendered on the next page. I don't want that. I want it so that if it can't render at least one item with the header, the table header will put itself on the next page. Likewise, how do I prevent the table footer (with the totals) from rendering separately at the top of the next page without at least one item row above it? At the very top of Page 7 is a good example of this. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
Well per usual, I got it working right after I ask for help. I could have sworn I had tried this already, but whatever. I added |
Beta Was this translation helpful? Give feedback.
-
Else you can use |
Beta Was this translation helpful? Give feedback.
-
I'm dealing with this same issue, I was wondering if you could provide the REPL link so I can take a look at how you structure your table in the fixed version? FWIW, I can't seem to get minPresenceAhead to work as expected. |
Beta Was this translation helpful? Give feedback.
Else you can use
minPresenceAhead
property. We don't have a lot of information about it in docs 👉🏻 https://react-pdf.org/advanced#orphan-&-widow-protection, but it can help tooLink to fixed repl