Table / EditableColumn: onEditComplete emitted event data is wrong #12822
Labels
Type: Enhancement
Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone
Describe the bug
EditableColumn.closeEditingCell emits the onEditComplete event with the wrong data. The data of the newly clicked cell is emitted, instead of the completed cell. When leaving the cell with the data "OUTOFSTOCK" and clicking into the cell with the data "INSTOCK", the event.data of the onEditComplete function should be "OUTOFSTOCK", but is "INSTOCK" instead. The event.data is displayed below the table:
Environment
Windows 11 & Stackblitz
Reproducer
https://stackblitz.com/edit/angular-jfoajd-hj13py?file=src/app/demo/table-cell-edit-demo.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)
18.15.0
Browser(s)
No response
Steps to reproduce the behavior
Table with cell editing and a onEditComplete listener:
Print the event.data of the onEditComplete function.
The onEditComplete function is going to print the data of the newly clicked cell. In this example it is going to print B.
Expected behavior
The event data should be the data of the completed cell.
For the example it should print A.
The text was updated successfully, but these errors were encountered: