[Vuejs]-Updating an array of Data in Vue JS

0👍

You are using POST HTTP Request, instead of GET.POST is for creating new records in API/DB.

I think this should work for you

data() {
        return {
            searchQuery: "",
            columns: ['ID', 'Name', 'Campaign', 'Method', 'Limit Per Connection', 'Limit Per Day', 'Active', 'Successes', 'Failures', 'Last Ran'],
            lastId: 0,
            rowsPerPage: 10,
            gridData: []
        }
},

created() {
  this.fetchData()
},

methods: {
  fetchData() {
   this.$http.get('/getData')
     .then(result => {
       this.gridData = result.data
       // or this.gridData = result.json()
     })
  }
}

Leave a comment