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
Prevent truncating on specific cell #27
Comments
up? |
Thanks for catching that "truncate: false" bug. I'll check it out when I have a chance, or you can send me a pull request. I haven't implemented truncation on a per cell basis, but again you could issue a pull request for it if you wanted. |
I checked truncate: false And that works fine. Perhaps what you where doing was passing false as a string? Its meant to be a boolean when the value is false. truncate: "false" This would have indeed truncated lines with the word "false". I've added support for truncation with no added character in 7c03d1b. |
As of tty-table@4.1.0 you can set truncation on a cell-by-cell basis using the column formatter function. Here's an example: formatter: function (cellValue, columnIndex, rowIndex) {
if (rowIndex === 1) {
this.configure({ truncate: false })
}
return cellValue
} This example would turn off truncation and wrap the text in the second row of the column the formatter function is associated with. |
Hi, I'm using
truncate: "..."
and global parameter for my table and I'm trying to prevent truncation on a single cell. I Had no luck withtruncate: false
(default value) which sets the cell content to"false"
(bug?)Any idea?
Thanks!
The text was updated successfully, but these errors were encountered: