diegomura / diegomura/react-pdf
Add option for wrapping only if it doesn't fit a page.
- 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.**
On my PDF there are certain elements where I use wrap={false} because it renders more nicely. There's a problem, I can't control wether this elements will fit or not on a page because they contain content made by the user.
**Describe the solution you'd like**
`wrap` is now a boolean prop. I propose adding a third option `"onlyIfUnavoidable"` that behaves as `wrap={false}` and when it doesn't fit, resorts to true
**Describe alternatives you've considered**
Right now I have some dumb heuristic to get a sense of the height of the element so I can control the what I pass to `wrap`
Contributor guide
Assessment
This issue has not been assessed yet.