dmk99 / react-pdf-table

Storybook Available
https://dmk99.github.io/react-pdf-table
MIT License
152 stars 62 forks source link

Possibility to set wrap on TableRow from code #49

Open sandorfarkas opened 2 years ago

sandorfarkas commented 2 years ago

Hello,

We picked react-pdf-table in our project and we bumped into a use case, which is discouraged in the README: "If you have lots of rows to display it's recommended to batch up the rows and render them on separate pages to ensure that values are not cut off."

However our content is dynamic and is hard to calculate the used height, so we came up with a fix in form of a patch, that solves the problem for us and we don't see any drawbacks for now. Of course using a patch is really not beneficial from maintenance point of view, so we would like to find a better solution which might be also useful for the community.

Our patch sets the property "wrap" on TableRow from false to true. We though of something like introducing a property for this on Table or TableHeader and TableBody so the user could turn wrapping on for his/her own risk. If you are open for such change we would create a pull request for it and also are open for discussion what would be the best approach to do so.

KaappoRaivio commented 1 year ago

I have the same problem and have come into the same solution

KaappoRaivio commented 1 year ago

Made a pr