react-pdf: Wrap won't work when text is higher than the page
Hello,
I found out that if a <Text> is wrapped in a <View>, then if the text is taller than the page, we run into an infinite loop calculation making the browser stucked and need to force quit.
Here is the sample, just copy paste the lorem ipsum until it overlap the page !
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (6 by maintainers)
I use an IDE which allow me to debug with a debugger (I’m not a big fan of console.log ^^) but it need to breakpoint to meaningful lines. Anyway, meantime I actually started with console.log and the build:watch for auto compilation, and I found out some preliminary things :
Base.jsfile in the functionfillRemainingSpaceif the element is aView(containing long text), then canBeSplitted is false, but if it’s aText(containing long text), then canBeSplitted is true. So when it’s a view, there is an infinite loop in therecalculateLayout()! I’m checking if I can fix it.