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.

Data Table: modifiers with headers in body cells

See original GitHub issue

What package(s) are you using?

  • carbon-components
  • carbon-components-react

Detailed description

Describe in detail the issue you’re having.

<th> cells in the table body aren’t getting the correct background color/border when using the zebra modifier. When using size modifiers (compact, tall, short), the cell spacing is also unaffected.

Is this issue related to a specific component?

Data Table with modifiers

What did you expect to happen? What happened instead? What would you like to see changed?

The th cells match the rest of the cells in the row

What browser are you working in?

Chrome

What version of the Carbon Design System are you using?

10.7.3

What offering/product do you work on? Any pressing ship or release dates we should be aware of?

Watson Health Design Pattern & Asset Library (we have developer available to help with this contribution)

Steps to reproduce the issue

  1. Have a <th> cell within the body of a table with the zebra or a size modifier

Please create a reduced test case in CodeSandbox

https://codesandbox.io/s/zebra-datatable-wtlyu

Additional information

Grey 90 screen shot Screen Shot 2019-09-10 at 2 42 41 PM

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:22 (22 by maintainers)

github_iconTop GitHub Comments

1reaction
elizabethsjuddcommented, Feb 18, 2020

@carbon-design-system/developers

@ChevonNwosu can work on the first item in the todo list if you want to assign it to him.

1reaction
tw15egancommented, Feb 18, 2020

Agreeable To-Do list?

  • th supported inside tbody with proper sizing
  • Determine styles for th when placed inside tbody

I agree with Vince that they should receive the same styles as th inside thead, as that seems to be the w3 standard.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using id and headers attributes to associate data cells ... - W3C
The objective of this technique is to associate each data cell (in a data table) with the appropriate headers. This technique adds a...
Read more >
Data tables - Material Design
Data tables display sets of data across rows and columns. ... Column header names describe the type of content displayed in each column....
Read more >
column-selector - DataTables
Each column has only one cell which is used as the column header - see orderCellsTop for information on how DataTables selected the...
Read more >
Data Tables - Lightning Design System
To create an accessible table, the top row of column headers ( th ) are placed in a thead . Each one receives...
Read more >
DataTables: Add class to table cells, but not table headers?
Use this to add the class to the cell, 100% working solution, make sure the ... rowData[0]); // adds the data attribute to...
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