Text / word wrap not working in flexGrow container
lucafaggianelli opened this issue · comments
Describe the bug
Text / word wrap not working in flexGrow container
To Reproduce
Snippet here
You can make use of react-pdf REPL to share the snippet
Expected behavior
The <Text>
component is correctly sized so I expect that its content get correctly wrapped
Screenshots
The component with debug activated is the Text
one, just to show its size is correct.
Notice that text doesn't wrap before the sidebar, that is, at the end of the Text component, but it wraps at the end of the page
Just playing around, I noticed that if I set a specific width (300 in the example), to the <Text>
component, the content is correctly wrapped:
Desktop (please complete the following information):
- OS: MacOS
- Browser: chrome
- React-pdf version: 3.3.8
I have encountered the same problem. Have you resolved it?
Yes but not really 😂, at the end I modified my layout to size the left column at a fixed width (the one with white background and the main content) so now I can use children with flex grow properties that won't overflow the text because their parent has a fixed width. So it's a kind of workaround
I hope that helps you
Hi @diegomura , any idea on this issue, is it a bug? If you point me to the right direction I can write a PR to fix it