ratiw / vue-table

data table simplify! -- vuetable is a Vue.js component that will automatically request (JSON) data from the server and display them nicely in html table with swappable/extensible pagination component.
MIT License
1.83k stars 303 forks source link

How to remove a specific element? #104

Closed davidpmtz closed 7 years ago

davidpmtz commented 7 years ago

Hi, is there a way to do this?

this.data.$remove(element);

and then remove the element from the view.

TIA.

ratiw commented 7 years ago

@davidpmtz Removing the data or the HTML element?

davidpmtz commented 7 years ago

@ratiw both, first remove the data, and then remove the HTML.

Something like this this.items.$remove(item) $remove

ratiw commented 7 years ago

@davidpmtz If you remove the data, the reactivity in Vue will take care of removing the associated table row (HTML element) by itself. You can access the loaded data via tableData. See similar question here.

davidpmtz commented 7 years ago

Yeah thanks @ratiw