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.

Table Header Width Bug, When There's Row Selection Configuration

See original GitHub issue

I think there’s complains about Table Header and Table Body column mismatch. But I want to dig a little bit deeper, maybe could help you find the root cause.

Test Version v3.1.0, with all the css files there.

OK, so this is the first one. I have the row_selection configurations, something like these:

selectRow = {{
	mode: 'radio',
	selected: [this.activeParameterKey],
}}

I also set some columns’ width, to test the alignment problem, I delete unnecessary fields.

<TableHeaderColumn width="300">Key</TableHeaderColumn>
<TableHeaderColumn width="150">Value Type</TableHeaderColumn>
<TableHeaderColumn width="50">Example Values</TableHeaderColumn>
<TableHeaderColumn>Technical Description</TableHeaderColumn>
<TableHeaderColumn>Required</TableHeaderColumn>
<TableHeaderColumn>Server Side</TableHeaderColumn>
<TableHeaderColumn width="200">Heimdall</TableHeaderColumn>
<TableHeaderColumn>Beacon Key</TableHeaderColumn>
<TableHeaderColumn>Event Key</TableHeaderColumn>
<TableHeaderColumn width="200">Value Unit</TableHeaderColumn>

The Results are showing below: alt text

So here’s the problem. For the of selection button column, it takes the width of “Key” column, which is 300. For the of “Key” column, it takes the width of “Value Type” column, which is 150. For the of “Value Type” column, it takes the width of “Example Values” column, which is 50. For the of “Example Values” Column, it takes itself width, which is 50, it is correct.

It looks so wired to me, but it looks like a column takes itself setting of width, but if the column after it has a width setting, it will overwrite current column width setting. Same things happens to “Heimdall” column, both “Heimdall” and “Server Side” column are setting to 200. Also “Value Unit”.

But the width in Table Body is all correct. Do you think this could be fixed soon? Or maybe I could look into the code.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
AllenFangcommented, Mar 26, 2017

I’ll fix it asap, sorry for lately reply and fixing.

0reactions
AllenFangcommented, Apr 21, 2017

@hnandarusdy, got it, but as I know, the width of TableHeaderColumn are support integer, string or string with px.

Read more comments on GitHub >

github_iconTop Results From Across the Web

datatable jquery - table header width not aligned with body ...
When running the application, the header width is not aligned with the body width. But when I click on the header, it is...
Read more >
Table Header width and Table Body width mismatch and ...
I am using "react-bootstrap-table" with version 2.11.0 and i am ... Table Header Width Bug, When There's Row Selection Configuration #1129.
Read more >
Possible column width bug when using multiple table ...
When you have a table with two rows of <th> column headers, datatables applies its column widths to the second of the two....
Read more >
DataTables - header column width not aligned with body ...
I am using DataTables from DataTables in TabStrip. I figure i faced the same problem as mentioned here: datatable jquery - table header...
Read more >
Column width won't adjust
Suzanne S. Barnhill · 1. Disable auto resizing (Options... on the Table tab). · 2. Disable any exact width for the entire table....
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