DataTables / DataTables/FixedHeader
Columns jump after scrolling back up with fixedHeader and no autoWidth
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 73
- Forks
- 83
- Avg merge
- 4m
- Merged PRs (30d)
- 1
Description
Steps to reproduce:
- Load this fiddle. https://jsfiddle.net/frabcus/eyk79woh/13/
- Make the window narrow vertically.
- Scroll down the page - the header stays fixed (floating)
- Scroll back up.
- At the top, when the header merges back in, all the column widths jump to new values.
I've narrowed it down to this code in _unsize: https://github.com/DataTables/FixedHeader/blob/master/js/dataTables.fixedHeader.js#L348
The cells are the only place the width of columns is stored in the DOM. And _unsize wipes those width values, resetting the table to not have fixed widths. If I make _unsize just do nothing and return, everything works fine.
The fix for bug #57 introduced this code. I don't know the solution as I don't fully understand the other cases. I'm not sure why for any header case the widths should be wiped.
DataTables-1.10.13
FixedHeader-3.1.2
jquery-3.1.1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked fiddle and the _unsize function in js/dataTables.fixedHeader.js, using the reported DataTables 1.10.13 and FixedHeader 3.1.2 setup. Reproduce the scroll sequence, then inspect how header width values are removed. Done means scrolling back to the top no longer changes the column widths while the other header cases remain working.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, jquery
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100