-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Wrong TypeScript type in jsPDF.table (#3086) #3087
Conversation
data: any, | ||
headers: string[], | ||
config: any | ||
data: { [key: string]: string }[], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should also allow numbers and booleans as values here. AFAIK, they work, too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think numbers and booleans don't work. At the beginning I used numbers and I had to convert all numbers to strings otherwise the cells were not even drawn. I'm currently checking it using the unit tests. If I use numbers the cells are not drawn. If I use booleans I get the error message getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.
It looks like numbers should work but don't work and booleans shouldn't work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright. Thanks for checking. I just remembered that numbers are planned to be fixed in #2875. Then I think we can leave it as is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR. I'll merge it now.
data: any, | ||
headers: string[], | ||
config: any | ||
data: { [key: string]: string }[], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright. Thanks for checking. I just remembered that numbers are planned to be fixed in #2875. Then I think we can leave it as is.
Fix: Wrong TypeScript type in jsPDF.table (parallax#3086) (parallax#3087)
Thanks for contributing to jsPDF! Please follow our
Contribution Guidelines
when creating a pull request.