Fixed #15852 - Table: Frozen columns are displaced
Fixed #15852 - Table: Frozen columns are displaced
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| primeng | ⬜️ Ignored (Inspect) | Visit Preview | Jun 17, 2024 2:21pm |
Hi @ranthonissen I haven't run your code but I just wanted to mention that the changes you made mostly undo the changes from this #15302 issue. Please check if your changes have not reversed that bug.
If so here is my qickfix:
recalculateColumns() {
const siblings = DomHandler.siblings(this.el.nativeElement);
const index = DomHandler.index(this.el.nativeElement);
const time = this.alignFrozen === 'right' ? (siblings.length - index + 1) * 50 : (index + 1) * 50; //this line
setTimeout(() => {
this.updateStickyPosition();
}, time);
this.updateStickyPosition();
}
Hi @bartlomiej-dobosz,
As far as I am familiar with the code, the fix provided in #15302 did not solve the problem, but only delayed the calculation of the column position, causing this issue #15852.
The underlying issue was that DomHandler.getOuterWidth(next) and DomHandler.getOuterWidth(prev) in the updateStickyPosition() function always returned 0, because of the table not being rendered/displayed at the time of calculation.
I think this fix resolves that issue, making the delayed execution of updateStickyPosition() unnecessary.
I haven't tested it myself, but i might also fix #15816, as it is the same code portion that seems to cause that issue
I found bug. When you add more columns and start sorting, this happens:
@bartlomiej-dobosz I'm unable to reproduce the behavior you show in your screenshot . Can you provide me with code that shows this bug?
@bartlomiej-dobosz Any update on this PR?
The issues on the frozen columns are a showstopper for our team. So if there is any way I can help and speed things up (with this and related frozen table column issues), don't hesitate to reach out to me, and I will see how I can help.
I think some more issues were introduced by #15302. So I think it might be a good idea to revert these changes, start over from that point with another approach, and closely keep an eye on the fix for the original issue #15303, and making sure no new issues get introduced.
Sorry I forgot to reply here. I think the error I described above was the result of my mistake. Ignore it. In my project I had to hack sorting to add a third state (ASC, DESC and NONE). And this affects your solution.