Open majkers opened 1 year ago
Did anyone found a solution for this?
same
I was able to narrow down the problem to here
if (this.resizableColumns && this.resizeColumnElement) {
let width = this.columnResizeMode === 'expand' ? this._initialColWidths : this._totalTableWidth();
ObjectUtils.reorderArray(width, dragIndex + 1, dropIndex + 1);
this.updateStyleElement(width, dragIndex, null, null);
}
@cetincakiroglu : I don't understand the intend behind the ternary operator. Is this maybe a copy paste error? Why not always use this._totalTableWidth().
This._initialColWidth is misleading if order in table is changed.
Error can be reproduced in table with
How to reduce:
Describe the bug
If user resizes column and drag/drops column to change the order then columns will not exchange the widths. The width of new position will be used for dropped column.
Reason of the issue: the table uses next styles for resize of flex tables that are not recalculated on column reordering
All details are in https://github.com/primefaces/primeng/issues/11372 and the issue still persists in PrimeNg 15.2.0
Environment
Angular: 15.2.1 PrimeNG: 15.2.0
Reproducer
https://stackblitz.com/edit/primeng-dropdown-demo-uf4ypj?file=src/app/app.module.ts
Angular version
15.2.1
PrimeNG version
15.2.0
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
14.17.3
Browser(s)
All
Steps to reproduce the behavior
Expected behavior
Column widths are moved together with columns