I have the following code, which returns a list, which is loaded into a table.
Vue.component('tickets',{
template: '#tickets-template',
data: function(){
return{
tickets:[]
}
},
created:function(){
this.getTickets();
},
methods: {
getTickets: function(){
$.getJSON('/findalltickets', function(tickets) {
/*optional stuff to do after success */
this.tickets = tickets;
}.bind(this));
setTimeout(this.getTickets, 10000);
}
}
});
new Vue({
el: '#app',
});
The detail is that when I add a new record to my database automatically without F5 , I recognize the new record in the table of my div
but the events click that I have linked with jQuery on that table no longer work on that last record entered, but on previous ones.