Carbon: DataTable with Pagination component does not wrap long words

Created on 2 Mar 2018  路  10Comments  路  Source: carbon-design-system/carbon

Detailed description

Currently working with DataTables, I noticed that the nowrap /wrap functions was not being applied into the columns.

Tried different types of approach using white-space and word-wrap and no results into the table.

This happens in any browser. Also, I tried the wrap into different components and we can see the same behavior.

I was able to edit a code pen and made it work with the simple DataTable, but this does not work in the DataTable with Pagination component.

Additional information

wrap-problem-datatable
image

3 inactive bug 馃悰

All 10 comments

it's important to say that in the second image I was also using the word-wrap : break-all;

But this only works with the min and max width set

@bsonefeld do we have any guidelines around when the text should wrap in a table?

@aagonzales I'm not sure if we had thought of a truncation patterns for table columns. Do we use the ... for a specific character count?

The column headers should wrap but the content in the table should respond like the following:

  • All columns should shrink to the smallest possible size without causing content to over flow to the next line. Once all columns are as small a width as possible then the tables triggers horizontal scroll and the user must scroll left and right to view content.
  • This keeps the rows even heights which is important for scan-ability
  • This is how the design is intended to work.
  • Content should not truncate unless its non-important text then it can ...

    • If column content is regularly very long then consider putting that information in an expandable table instead.

@carbon-design-system/ui this needs to be implemented now that guidelines have been created.

Will bring it up and try and get it prioritized accordingly 馃憤

I think if we add a scrolling behavior as a default it will solve this problem. If the string is small enough to overflow, it will behave normally, otherwise, it will start the scrolling behavior.

We've marked this issue as stale because there hasn't been any activity for a couple of weeks. If there's no further activity on this issue in the next three days then we'll close it. Thanks for your contributions.

We've marked this issue as stale because there hasn't been any activity for a couple of weeks. If there's no further activity on this issue in the next three days then we'll close it. You can keep the conversation going with just a short comment. Thanks for your contributions.

As there's been no activity since this issue was marked as stale, we are auto-closing it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xrissot-ibm picture xrissot-ibm  路  3Comments

emyarod picture emyarod  路  3Comments

ConradSchmidt picture ConradSchmidt  路  3Comments

windgaucho picture windgaucho  路  3Comments

jendowns picture jendowns  路  3Comments