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.

"rowspan" attribute does not appear in DOM

See original GitHub issue

<th rowspan="2"></th> does not set rowspan in the DOM.

Component:

render: function() {
  return (
    <thead>
      <tr>
        {this.props.columns.map(this.renderColumnLabel)}
        <th rowspan="2"></th>
      </tr>
      <tr>
        {this.props.columns.map(this.renderColumnControl)}
      </tr>
    </thead>
  );
}

Output:

...
<th data-reactid=".r[5je1f].[0].[1].[1].[6].[0].[0].[1].[0].[0].[0].[1]"></th>
...

Can this be my first PR? 😃

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

5reactions
sophiebitscommented, Aug 14, 2013

If you do rowSpan it’ll work – we use the camelcase version for attributes for consistency with the DOM interface where you’d do el.rowSpan = 2;. I’ve already opened #255 to warn when using the wrong case since lots of people get confused by this.

1reaction
iniminocommented, May 4, 2014

Given that this trips people up, instead of being consistent with the DOM, why not be consistent with HTML and support all-lowercase attributes?

I just had to go back to the docs for this issue about the “autocomplete” attribute.

I’m writing something that looks like HTML, it should work like HTML… otherwise it’s an inconsistency, not consistency.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Handle cells with rowspan when hiding table rows
The problem exists because when we hide a row, whilst we want all the cells to be hidden, we want the pseudo-cells —...
Read more >
HTML | rowspan Attribute - GeeksforGeeks
The rowspan attribute in HTML specifies the number of rows a cell should span. That is if a row spans two rows, it...
Read more >
HTML th rowspan Attribute - W3Schools
Definition and Usage. The rowspan attribute defines the number of rows a header cell should span. Browser Support. Attribute.
Read more >
setting rowSpan property for a table cell - webMethods
rowSpan is structural, so you are correct that CSS can not change that. But you could probably use CSS to make the cells...
Read more >
Tables in HTML documents
Tables should not be used purely as a means to layout document content as this may present problems when rendering to non-visual media....
Read more >

github_iconTop Related Medium Post

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