AllenFang / AllenFang/react-bootstrap-table

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

未關閉
#1,129 9 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
bug in progress
主要語言
JavaScript
星號
2.2k
分支
761
PR 合併指標
30 天內沒有已合併 PR

描述

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:
![alt text](https://raw.githubusercontent.com/wy19900814/CS526/master/Screen%20Shot%202017-03-08%20at%205.46.32%20PM.png "Column Width Setting With Selection Column")

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 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。