diegomura / diegomura/react-pdf

wrap={false} but for components that span across multiple pages

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

Description

**Is your feature request related to a problem? Please describe.**
I usually need a component that, if there is not enough space on a page, it starts on the next page. But that component can span across multiple pages. When I do wrap={false}, it cannot span across multiple pages, it just tries to fit everything in one page.

**Describe the solution you'd like**
It would be amazing for something like breakWhenNeeded={true} and it does this behaviour.

**Describe alternatives you've considered**
I used wrap property, but it failed. I also tried minPresenceAhead property, but it does not seem to do anything. I could not figure out how it works.

**Additional context**
There is a new library for calculating the height of items: https://github.com/chenglou/pretext
Maybe there is a solution to this there.
Also, this could help a lot since sometimes there are problems where at the end, the entire component gets mushed.

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.