fix(datatable): apply frozen column left offset to header styles and reset on unfreeze DEV-147#6906
fix(datatable): apply frozen column left offset to header styles and reset on unfreeze DEV-147#6906tesster7 wants to merge 2 commits into
Conversation
…reset on unfreeze DEV-147
📝 WalkthroughWalkthroughThis change modifies how frozen column positioning is applied in a submissions table component. When a column is unfrozen, the Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
|
| if (!isFrozen) { | ||
| this.frozenLeftRef = 0 | ||
| } |
There was a problem hiding this comment.
Stale
frozenLeftRef after unfreeze-then-scroll-then-refreeze
Resetting frozenLeftRef to 0 on unfreeze is correct for the immediate fix. However, if the user unfreezes a column while the table is scrolled and then freezes another column without scrolling afterward, frozenLeftRef will still be 0 even though the viewport offset is non-zero. The frozen column header will momentarily render at left: 0 until the next onTableScroll event fires and corrects it.
This is a minor visual flash rather than a data issue, and the scroll handler will self-correct. Worth noting in case it surfaces as a follow-up bug report, but the trade-off is acceptable given it prevents the original stuck-header regression.
magicznyleszek
left a comment
There was a problem hiding this comment.
Generally works and fixes the issue. There is another issue found by greptile. I tried to quickly find a way to fix it and it will require adding more complexity to the code. It is more of an edge case and is fixed as soon as user scrolls, so I would say let's leave it.
🗒️ Checklist
#Support Docs Updates, if any<type>(<scope>)<!>: <title> DEV-1234Front endand/orBack endorworkflow📣 Summary
Fixed a bug in the Data Table where unfreezing a column after scrolling left the column header stuck in the wrong position.
📖 Description
When a column was frozen in the Data Table and the table was scrolled horizontally, unfreezing the column would leave the column header pinned at the scrolled position while the rest of the column snapped back to its correct place — causing a visual mismatch. The header now correctly returns to its original position when a column is unfrozen.
💭 Notes
fixed.data.table.column.freezing.issue.mp4
👀 Preview steps