AllenFang / AllenFang/react-bootstrap-table

Table header and Table body is not align after updating from version 2.5.7 to 4.3.1

Đang mở
#2,113 0 bình luận 1 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
2.2k
Fork
761
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Hello,

We are using react-bootstrable-table 2.5.7 updating to the latest(4.3.1),

As I dig dipper I look into the library, react-bootstrap-table column width actually computed, and every time the window is resize this will trigger the column width computation

The method is _**_adjustHeaderWidth**_, and there is a condition that preventing to compute the width,
https://github.com/AllenFang/react-bootstrap-table/blob/master/src/BootstrapTable.js#L1476
_**if (isScroll || this.isVerticalScroll !== isScroll) {**_
but 2.5.7 version without this condition the alignment is fine.

The condition actually is isScroll to check if there is a scroll which is always false(As I check in our case).
_**tbody.parentNode.getBoundingClientRect().height**_ and
_**tbody.parentNode.parentNode.getBoundingClientRect().height**_ has the same value

and isVerticalScroll is initialize to false

Please advise.

Thank you!

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.