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

headers not getting proper width if first column header is empty [work around included for webkit] #120

Closed
gregveres opened this issue Aug 20, 2016 · 1 comment

Comments

@gregveres
Copy link

gregveres commented Aug 20, 2016

I have a table that I just added a new first column to. The column is a time scale for the rest of the table so it doesn't have any content in the first header entry.

This causes the table headers to be the wrong size - default size? And it screws up the rendering of the whole table.

I didn't debug the code to figure out why but I did think about a work around. I put &nbsp as the content of the first column header so that it now has some content. This worked around the problem fine.

You might want to put this as a note in the docs.

I just tried this in Edge and Firefox. It didn't work there. In both those browsers the floating headers appear but they have narrow widths and they get inserted into the DOM in such a way that they affect the rendering.

Another workaround I just thought of was to put in a letter that has the same colour as the background. Although I think you will see it covering up the contents of the first column as it scrolls.

@gregveres gregveres changed the title headers not getting proper width if first column header is empty [work around included] headers not getting proper width if first column header is empty [work around included for webkit] Aug 20, 2016
@gregveres
Copy link
Author

it turns out that this might have been related to the problem with setting up sticky headers on a dynamic table. When I added the extra column, my check to see if the table had been setup properly was no longer valid. I was checking to see if there was at least one header column in the table, if there wasn't, then I would wait and check again. The problem was that in adding the time scale, there was always one non-dynamic column.

I changed the test and the sticky headers started working again. I also put a width element on the empty header so that may have contributed to it helping as well.

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

1 participant