AllenFang / AllenFang/react-bootstrap-table
Table Header Width Bug, When There's Row Selection Configuration
- Dominant language
- JavaScript
- Stars
- 2.2k
- Forks
- 761
- PR merge metrics
- No merged PRs in 30d
Description
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.
```
Key
Value Type
Example Values
Technical Description
Required
Server Side
Heimdall
Beacon Key
Event Key
Value Unit
```
The Results are showing below:

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.
Contributor guide
Assessment
This issue has not been assessed yet.