table
table copied to clipboard
Add option to disable wrapping text
When width is set, cell text is always wrapped. In some cases this is undesirable. For example adding formatting that will shrink the effective size of the cell. see gajus/table#117
This is a quick and dirty PR to get started on this feature. Obviously tests and docs are needed, just wanted to get feedback before going further.
disableWrap is a boolean option on columns that allows bypassing the text wrap functions altogether.
Pull Request Test Coverage Report for Build 232
- 7 of 10 (70.0%) changed or added relevant lines in 6 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage decreased (-0.007%) to 72.941%
| Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
|---|---|---|---|
| src/alignTableData.js | 0 | 1 | 0.0% |
| src/calculateRowHeightIndex.js | 2 | 3 | 66.67% |
| src/wrapCell.js | 1 | 2 | 50.0% |
| <!-- | Total: | 7 | 10 |
| Totals | |
|---|---|
| Change from base Build 230: | -0.007% |
| Covered Lines: | 174 |
| Relevant Lines: | 240 |
💛 - Coveralls
I can see the use case for this.
Cool! I'm happy to flesh out this PR if it's likely to get merged
also running into an issue with eslint-config-canonical version miss match with eslint? (see travis)
It looks like it's failing on master
The build is now working.
@IanEdington If you rebase, the CI/CD is now working as expected.