Open KindaOK opened 2 years ago
IIRC, this was done on purpose as it was a requirement of the project I wrote this lib for in the first place. It isn't used there anymore, so I am open for changing this. However, I am honestly not sure what the best solution (best in terms of what most would expect) of the following would be:
I'd personally expect either (1) or (2).
If anyone else is reading this, feel free to jump in with an opinion what your expected behaviour would be.
I personally prefer 2, but the existing behavior (1) seems to be fine in most scenarios. I would need to do some more testing, but I think that this situation only crops up when you force it to with large rows. Again, I should probably verify this.
Edit: The default behavior is pretty good about splitting eagerly, especially with small rows. You need pretty tall rows to get this kind of behavior. Since the use case for tables is almost always short rows, it's not too big of a problem.
When a row has a page break within it, the current behavior is that table headers are not inserted. If there are other rows, however, then having no table headers seems incorrect. Sample output here: header-split.result.pdf (code as a unit test below). Is this the expected behavior? It doesn't seem right in the sample output. Existing unit tests also don't have any great examples of this because the only ones with rows across page breaks don't have any following rows.