Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cleforwen opened this issue Jun 5, 2020 · 1 comment

Comments

@cleforwen
Copy link

cleforwen commented Jun 5, 2020

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!

@cleforwen cleforwen changed the title Table header and Table body is not align after migrating from version 2.5.7 to 4.3.1 Table header and Table body is not align after updating from version 2.5.7 to 4.3.1 Jun 5, 2020
@DeDX3
Copy link

DeDX3 commented Mar 29, 2022

I'm facing this exact issue. Did you find any solution for this? Please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants