Event listeners not removed for ReorderableRow and ReorderableColumn #11414
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
I'm submitting a ... (check one with "x")
Copied from #11357 (which was partly solved and then closed)
The main problem is in the implementation of both the unbind methods for
ReorderableRow
andReorderableColumn
. To illustrate this, a small excerpt from one of the bind functions:primeng/src/app/components/table/table.ts
Lines 3315 to 3316 in 3fe4a80
And the corresponding unbind:
primeng/src/app/components/table/table.ts
Lines 3333 to 3336 in 3fe4a80
As can be seen, the listeners are registered on the
nativeElement
but removed from thedocument
(where the listener was never registered), leaving the event listeners on the nativeElement behind. One could argue that, as the element is removed also the listeners get cleaned up, but this does not work for every usecase. Also, it seems that the idea was to have unbind methods, so let's make sure that they're correct :)The text was updated successfully, but these errors were encountered: