@bobbybouwmann man you're a lifesaver, that works. However I had to pull the entire <table> into the vue template which I thought was odd. Before I did that it would render the <tr> outside of the table entirely.
anyway, that got me up and running... directly into my next brick wall. In this table I have a @click so that I can delete a row and its data.
like so...
<td style="text-align: center"><a href="#" id="sa-warning"><i
class="ti-close text-danger" @click="destroy(permission.id, index)"></i></a></td>
then a destroy method...
methods: {
destroy(id, index) {
swal({
title: "Are you sure?",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Yes, delete it!",
closeOnConfirm: false
}, function () {
swal({
title: "Deleted!",
type: "success"
}, function () {
//axios.delete('/admin/permissions/' + id);
alert(id + '' + index)
items.slice(index, 1)
});
});
}
}
the alert() returns the correct id, and index but how can I now remove that item from the data so that it is no longer visible on the page without doing a post back?
I have tried
items.slice
this.items.slice
permission.slice
this.slice(index,1)
all give the error Uncaught ReferenceError: '...' is not defined
Again thank you tremendously!