Skip to content
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

Merged
merged 3 commits into from Feb 10, 2021
Merged

Fix: Wrong TypeScript type in jsPDF.table (#3086) #3087

merged 3 commits into from Feb 10, 2021

Conversation

jabaa
Copy link
Contributor

@jabaa jabaa commented Feb 8, 2021

Thanks for contributing to jsPDF! Please follow our
Contribution Guidelines
when creating a pull request.

data: any,
headers: string[],
config: any
data: { [key: string]: string }[],
Copy link
Collaborator

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.

Copy link
Contributor Author

@jabaa jabaa Feb 9, 2021

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.

Copy link
Collaborator

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.

Copy link
Collaborator

@HackbrettXXX HackbrettXXX left a 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 }[],
Copy link
Collaborator

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.

@HackbrettXXX HackbrettXXX merged commit c91995d into parallax:master Feb 10, 2021
@jabaa jabaa deleted the bugfix/issue-3086 branch February 10, 2021 09:44
sthagen added a commit to sthagen/parallax-jsPDF that referenced this pull request Feb 10, 2021
Fix: Wrong TypeScript type in jsPDF.table (parallax#3086) (parallax#3087)
This was referenced Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants