[GH-DEV#1824] Selected row removal

Tags: #<Tag:0x00007f8b1dd56088> #<Tag:0x00007f8b1dd55f48>

Hi there,
I am using the afterRemovRow hook in order to remove the selected rows, There is no issue for me when I drag and select the rows to get removed because hook provide me all the selected rows index at once, But when I tries to remove the multiple selected row with CTRL+ Click in that case afterRemovRow gets triggered multiple time (no of selected rows) and not provides me all selected row indexes at once. https://jsfiddle.net/0ntL5w2f/10/

Hi @rupeshfend

Iā€™m not sure if I understand your problem correctly. Do you mean that when you select multiple rows and remove them, the afterRemoveRow hook is fired individually for each removal operation? If so, this is a correct behavior.

1 Like

Case I : When I drag the mouse over the rows and select the rows to remove, then afterRemoveRow hook triggers only once.
Case II : When I select rows at distinct addresses with CTRL+ click, and click remove rows then afterRemoveRow hook triggers differently for each row. Where expected behavior is as mentioned in case I.

@rupeshfend

I understand. It seems that if we remove the rows that are neighbouring with each other, then it is fired only once with the correct information about the amount of rows removed. If we select non-consecutive rows then it is fired individually for each row removed. We will need to investigate this further and discuss it with our development team. I will update you once I have more information.

1 Like

yes please, handling the logic with two distinct behavior is not correct, behavior mentioned in case 1 is perfect.