The text has the wrong width in flexbox layouts with columns
Describe the bug
The text has the wrong width in flexbox layouts with columns
To Reproduce
go to repl
Expected behavior
The text should be in the colored block
Screenshots
I dug into the issue a little bit and the text component has debug box with the right width, so I think the problem is in the @react-pdf/render or @react-pdf/textkit package.
Desktop (please complete the following information):
- React-pdf version 2.2.0
Thanks. Is this something introduced in the last version or it works the same in older ones? I'll try to take a look
Yep, it was broken in one of the latest versions
For some reason, yoga calls measureText with full-page width firstly and after the real width is here but lines are already calculated and saved to the node. Any ideas why yoga adds a measureText call?
https://github.com/diegomura/react-pdf/blob/master/packages/layout/src/text/measureText.js#L22-L33
as duplicate of #2182