question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ngx-Datatable does not wrap text when [scrollbarV]="true"

See original GitHub issue

I’m submitting a … (check one with “x”)

[x ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter

Current behavior When setting [scrollbarV]=“true” and [rowHeight]=“getRowHeight” text is not wrapping in the row even though the height of the row is large enough for it to wrap. Currently my getRowHeight function just returns 500.

Expected behavior I would expect that as long as the row height is large enough the text should wrap inside the row. It currently does this if you set [rowHeight]=“auto” and [scrollbarV]=“false”. I would expect that it should also work when enabling the scrollbarV.

Reproduction of the problem <ngx-datatable #table id=“translationTable” [scrollbarH]=“true” class=“material” [rows]=“tableData” [columnMode]=“‘standard’” [headerHeight]=“50” [footerHeight]=“50” [rowHeight]=“500” [selected]=“selected” [scrollbarV]=“true” [limit]=“10”>

ngx-table wrapping issue

Please tell us about your environment: windows, npm, using ng serve

  • Table version: 13.1.0

  • Angular version: 5.2.9

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ] all

  • Language: [all | TypeScript X.X | ES6/7 | ES5] all

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:9

github_iconTop GitHub Comments

6reactions
michelle-sokolovcommented, Jul 3, 2020

Try adding this to your CSS

.ngx-datatable.material { overflow-wrap: break-word; }

This worked perfectly once I changed my rowHeight to ‘auto’

3reactions
kmontalvo3commented, Jul 2, 2020

Try adding this to your CSS

.ngx-datatable.material { overflow-wrap: break-word; }

Read more comments on GitHub >

github_iconTop Results From Across the Web

Word Wrapping of Column Name - angular - Stack Overflow
I am using ngx-datatable to display my data, and i dont want to show horizontal scroll bar so i need to word wrap...
Read more >
swimlane/ngx-datatable - Gitter
Hello All, I'm trying to wrap text in ngx-datatable column can anyone please ... its not reading rows count and columns count, any...
Read more >
swimlane/ngx-datatable - Gitter
Hello All, I'm trying to wrap text in ngx-datatable column can anyone please help how can i ... ngx datatables not detected on...
Read more >
swimlane/ngx-datatable - Gitter
I don't get the idea, you mean the horizontal scrollbar will keep adding offset space if you resize it from big to small?...
Read more >
DataTables scrollX Option - GeeksforGeeks
This option will enable the user to horizontally scroll any overflowing content in the table itself. This can be used when there are...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found