diegomura / diegomura/react-pdf

minHeight causes overlapping with fixed elements

Open
#2,728 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
16.8k
Forks
1.3k
Avg merge
5h 6m
Merged PRs (30d)
52

Description

**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**

[REPL Reproduction](https://react-pdf.org/repl?code=3187b0760ce02e00403604b3014c2302f0c50771810402702043013c00a01180066a04a00e803304e39cb005736e81b80287ea122c000a00440188618e4e86007cb3f8c180079c48609c02db2305014ad5eb47100e6c88c048556a01a8264b85800f64004c8c99fea00ab22ba19f8005821a384c310c08723107b2010c380c1c70084c000385b21a803d005077afbe63b3b14f8037a20a04030eb1267939003e800d0c023cba12b931afba996e0035b2293a2542002f8c34291c3204e54c0e920004b20239885400170c0033350c14ccc24011a7398540ffa0618012882e24cc00350c2514fe6161bf495e48637551d0e8537fbe4cc9662be534da3d0188c7c4103cd2500924818047d02408e4350626079053228000)

(Also try to replace `minHeight` with `height`. A different but possibly related issue appears on page 2)

```jsx
const lines = new Array(100).fill(null);

const PDF = () => (



This is a header on each page

{lines.map((_, i) => (

Row {i + 1}

))}


);
```

**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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.