minHeight causes overlapping with fixed elements
Describe the bug
If you have a repeating element that wraps across multiple pages, while also using fixed elements that should appear on multiple pages, if you add a minHeight style to the repeating row, it appears to ignore the fixed space already consumed by the other elements. Interestingly, this doesn't happen if you use height instead.
To Reproduce
(Also try to replace minHeight with height. A different but possibly related issue appears on page 2)
const lines = new Array(100).fill(null);
const PDF = () => (
<Document>
<Page>
<View fixed>
<Text>This is a header on each page</Text>
</View>
{lines.map((_, i) => (
<View key={i} style={{ minHeight: 30 }} debug>
<Text>Row {i + 1}</Text>
</View>
))}
</Page>
</Document>
);
Expected behavior I expect the repeating rows to respect the space already occupied by the fixed elements.
Desktop (please complete the following information):
- OS: macOS
- Browser: Chrome
- React-pdf version: 3.4.4
Hey, did you end up solving this issue?
I'm afraid not. I described a similar issue in #2763 but it seems you've already seen that 😄