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

Remove tfoot if not needed #1

Closed
toddheslin opened this issue Jul 2, 2017 · 1 comment
Closed

Remove tfoot if not needed #1

toddheslin opened this issue Jul 2, 2017 · 1 comment

Comments

@toddheslin
Copy link
Contributor

Thanks for this library! I was thinking of building it myself but you've gotten off to a good start.

I'd like to contribute, but just have a small request for now so I'll paste it as an issue.

In your buildFooter function, if no totals are used, there is a blank <tfoot></tfoot> added. This doesn't look great on tables with borders as it appears to be a blank row. Add this patch to the buildFooter function to return an empty string:

        if (content.length > 2) {
          return '<tfoot><tr>' + content.join('') + '</tr></tfoot>';
        } else {
          return ''
        }
@toddheslin
Copy link
Contributor Author

Just realised that my logic here was based on the current table I was testing. Submitted a pull request :)

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

No branches or pull requests

1 participant