Closed CSENoni closed 1 year ago
From @fkolar:
Update
Scrolling Issue is valid problem: and this should be the issue.
Once resets the count based on the given index:
<fdp-column name="rowIndex" key="rowIndex" label="Row index"> <fdp-table-cell *fdpCellDef="let item; let i = rowIndex"> <span>Row index {{ i }}</span> </fdp-table-cell> </fdp-column>
and other keep adding row index mirroring the size of the array.
https://fundamental-ngx.netlify.app/#/platform/table/scrolling? https://sap.github.io/fundamental-ngx/#/platform/table/scrolling, it is using the same code, but it is not reseted.
Even I have fix locally created, there are allot of failed table unitests in the main branch. Even without main change. @mikerodonnell89, any idea. do you have failed tests too? nx tests platform-table
?
The problem is within setTabelRows
this._dataSourceTableRows = rows;
this._tableRows = [...this._newTableRows, ...this._dataSourceTableRows];
this.onTableRowsChanged();
We are putting new and existing rows together, but when we convert Application rows to TableRow we set the index to item's index. So its 0 - 50, 0 - 50.
The solution would be to have something like
this._dataSourceTableRows = rows;
this._tableRows = [...this._newTableRows, ...this._dataSourceTableRows];
**this._reIndexRows();**
and this would update the index in the main array
It is working fine now. Thanks
Is this a bug, enhancement, or feature request?
bug
Briefly describe your proposal.
As requested from https://github.com/SAP/fundamental-ngx/issues/10171, this issue is created for easier track.
Which versions of Angular and Fundamental Library for Angular are affected? (If this is a feature request, use current version.)
latest
If this is a bug, please provide steps for reproducing it.
Please refer to link:
Please provide relevant source code if applicable.
https://sap.github.io/fundamental-ngx/#/platform/table/scrolling -> not reset after fetching new page https://fundamental-ngx.netlify.app/#/platform/table/scrolling -> reset after fetching new page
Is there anything else we should know?