[Vuejs]-How to remove current tr row in table using vuejs

0👍

Finally, I have found solution.

I write this line in VueJs method:

event.path[2].remove();

In VueJs Method:

updateMileageLogV2: function updateMileageLogV2(id, event){
        let item_id = id;

        event.path[2].remove();// remove current tr row on click.

}

Explanation:
See in screenshot, event.path has array of DOM list.

enter image description here

  • At 0 index a tag
  • At 1 index td tag
  • AT 2 index tr tag

Leave a comment