primeng icon indicating copy to clipboard operation
primeng copied to clipboard

p-table cell edit wrong index on onEditComplete event

Open MrCosmo opened this issue 6 years ago • 0 comments

I'm submitting a ... (check one with "x")

[x ] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Plunkr Case (Bug Reports) https://stackblitz.com/edit/github-yvvksh

Current behavior When clicking a cell in the first row, onEditInit event emits. The data in that event shows that the index of the row is 0 (zero). When you click a cell in the second row, onEditComplete event emits. The data in that event shows that the index of the row is 1.

Expected behavior The data in onEditComplete should emit the same rowindex as was emitted on OnEditInit.

Minimal reproduction of the problem with instructions

  • Start cell edit by clicking one of the cells in the table, as provided in the Plunkr above.
  • Note that the log writes the current index of the row you clicked
  • Click another cell in another row
  • Note that onEditComplete event triggers with the index of the row you clicked in the step above

Please tell us about your environment:

  • Windows 10

  • VS Code

  • Angular version: 9.1.7

  • PrimeNG version: 9.1.0

  • Browser: all

  • Language: all

  • Node (for AoT issues): node --version = 12.13.0

MrCosmo avatar Jul 27 '20 07:07 MrCosmo