-
Notifications
You must be signed in to change notification settings - Fork 782
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
Column header widths change after render #285
Comments
Im having the same issue |
There seems like two issues in here, for first, your tab is means browser tab? Two, the width issues exist actually, I've started a new plan for fixing this problem currently, but need some time, here is reference.
which that means? |
By Tabs I mean react-bootstrap tabbed interface, not browser tabs. And by breaking the rules that a table header goes in the same table with the table body, you're setting up a structurally meaningless table (terrible for ARIA), and giving yourself huge problems in setting column widths. With the table header as part of the same table, then the columns can't -- just can't -- be different widths from each other. And that's a good thing. |
@L5eoneill, could you please give some example code(repo or gist) for me to reproduce this issues? |
Here's a gist: https://gist.github.com/L5eoneill/74c96b78a12c3deed464 Don't know though... so much going on in React components, it could be a problem with something elsewhere in the app. Notice: when I look at the output, that name column... in the gist you see it has width="360"? In the DOM it has this, showing width set at 518px:
And you can see the other columns do not have widths set on them. So, your module is ignoring the width setting for some unknown reason. |
@L5eoneill, I understand, like I said, I've a new plan for fixing these all problem about resizing and column width. if I completed, I'll post here and just try again on new version, but need more time. |
Don't know if it will help you any, but any interaction that re-renders the table fixes the thead alignment problem: switch to another page, select a selectRow check (or radio). |
I have the same issue. Is there any solution to solve this problem?@AllenFang |
I'm solving this issue, I think this patch is coming soon. |
@AllenFang Ok.That's awesome.Thanks. |
I have the same issue and same scenario with @L5eoneill on the first render table alignment is very clean and perfect. but every time I re-render table or switch between the tabs ( Currently I'm trying to create my own table width and column width computation and I can say it is quite difficult. I wish I could call the same function that could compute the width like Thanks in advance @AllenFang for the patch! |
@AllenFang i think adding |
hi all, about the |
Awesome Allen! I'm having the same issue here as well. Hope to see the patch soon! Thanks in advance! =) |
Issue is still there, Width of table head and columns are not same and not aligning |
@RishiAgar, what's version you used and have any screenshot? thanks |
Version 2.11.2
|
Sorry, never mind, my mistake, checked logs, some caching issue. |
Table rows render first, with column headers in the wrong widths. Then, they jump to the correct widths to go with the rows. This is especially visible when switching between tabs that each contain their own tables. It takes something like a whole second to settle down the table layouts, which isn't good for the user experience.
When I set all columns but one to fixed width:
<TableHeaderColumn dataField="thefield" dataFormat={theformatter} width="200">
The output is not reflecting the widths I set, and the headers still jump on tab switch.
The column headers aren't even in the same table as the data. I assume that's necessary for other functionality with sorting and such, but it is really breaking the rules of document structure!
The text was updated successfully, but these errors were encountered: