We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am trying to align a footer cell to right.
OS: latest public macOS
Terminal Emulator: iTerm2 with zsh and zprezto plugin
Node Version: LTS
const header = [ { value: 'Test', align: 'left', headerAlign: 'left', footerAlign: 'right', }, { value: 'Score', align: 'left', headerAlign: 'left', footerAlign: 'left', formatter: (cellValue) => { return cellValue > 60 ? green(cellValue) : red(cellValue) }, }, ] const rows = [ ['Performance', 64], ['Accessibility', 70], ['Best Practices', 30], ['SEO', 60], ['PWA', 100], ] const footer = [ 'Total', (cellValue, columnIndex, rowIndex, rowData) => { const total = Math.round(rowData.map((i) => i[1]).reduce((p, c) => p + c) / 5) return italic(total) }, ] const renderedTable = Table(header, rows, footer).render() console.log(renderedTable)
The text was updated successfully, but these errors were encountered:
Thanks for reporting. Feel free to send me in a PR, otherwise it will be a little while before I get to this.
Sorry, something went wrong.
No branches or pull requests
Problem Summary
I am trying to align a footer cell to right.
Expected Result (screen shot if possible)
Actual Result (screen shot if possible)
Environment Information
OS: latest public macOS
Terminal Emulator: iTerm2 with zsh and zprezto plugin
Node Version: LTS
Steps to Reproduce
The text was updated successfully, but these errors were encountered: