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

Add option to disable wrapping text #118

Closed

Conversation

IanEdington
Copy link
Contributor

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 #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.

@coveralls
Copy link

coveralls commented Aug 12, 2020

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%
Totals Coverage Status
Change from base Build 230: -0.007%
Covered Lines: 174
Relevant Lines: 240

💛 - Coveralls

@IanEdington IanEdington force-pushed the ian.add.option.to.disable.wrapping branch from 3cb6b38 to 099dfdb Compare August 12, 2020 18:58
@gajus
Copy link
Owner

gajus commented Aug 12, 2020

I can see the use case for this.

@IanEdington
Copy link
Contributor Author

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

@gajus
Copy link
Owner

gajus commented Aug 30, 2020

The build is now working.

@gajus
Copy link
Owner

gajus commented Jan 2, 2021

@IanEdington If you rebase, the CI/CD is now working as expected.

When width is set, cell text is always wrapped. In some cases this is
undesirable. For example adding formating that will shrink the effective
size of the cell. see gajus#117
@IanEdington IanEdington force-pushed the ian.add.option.to.disable.wrapping branch from 4cd92e6 to fb30b3b Compare January 3, 2021 03:30
@IanEdington IanEdington deleted the ian.add.option.to.disable.wrapping branch March 15, 2023 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants