{"action":"created","issue":{"url":"https://api.github.com/repos/xaksis/vue-good-table/issues/296","repository_url":"https://api.github.com/repos/xaksis/vue-good-table","labels_url":"https://api.github.com/repos/xaksis/vue-good-table/issues/296/labels{/name}","comments_url":"https://api.github.com/repos/xaksis/vue-good-table/issues/296/comments","events_url":"https://api.github.com/repos/xaksis/vue-good-table/issues/296/events","html_url":"https://github.com/xaksis/vue-good-table/issues/296","id":329997224,"node_id":"MDU6SXNzdWUzMjk5OTcyMjQ=","number":296,"title":"2.6.3 causing infinite network request loop","user":{"login":"TheJaredWilcurt","id":4629794,"node_id":"MDQ6VXNlcjQ2Mjk3OTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/4629794?v=4","gravatar_id":"","url":"https://api.github.com/users/TheJaredWilcurt","html_url":"https://github.com/TheJaredWilcurt","followers_url":"https://api.github.com/users/TheJaredWilcurt/followers","following_url":"https://api.github.com/users/TheJaredWilcurt/following{/other_user}","gists_url":"https://api.github.com/users/TheJaredWilcurt/gists{/gist_id}","starred_url":"https://api.github.com/users/TheJaredWilcurt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheJaredWilcurt/subscriptions","organizations_url":"https://api.github.com/users/TheJaredWilcurt/orgs","repos_url":"https://api.github.com/users/TheJaredWilcurt/repos","events_url":"https://api.github.com/users/TheJaredWilcurt/events{/privacy}","received_events_url":"https://api.github.com/users/TheJaredWilcurt/received_events","type":"User","site_admin":false},"labels":[{"id":781859817,"node_id":"MDU6TGFiZWw3ODE4NTk4MTc=","url":"https://api.github.com/repos/xaksis/vue-good-table/labels/Need%20More%20Info","name":"Need More Info","color":"7861cc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-06-06T19:15:05Z","updated_at":"2018-06-06T19:47:23Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"* **Issue Type:** Bug\r\n* **Version:** 2.6.3 (issue does not occur in 2.6.2)\r\n* **Browser:** Any\r\n* **Expected Behavior:** Load the page, populate the content in the table\r\n* **Actual Behavior:** Loads the page, content is populated which triggers a page change, which then triggers data to be requested again, data is populated which triggers a page change, etc.\r\n\r\nUsing `mode: 'remote'`. Table must have enough data to require multiple pages."},"comment":{"url":"https://api.github.com/repos/xaksis/vue-good-table/issues/comments/395191179","html_url":"https://github.com/xaksis/vue-good-table/issues/296#issuecomment-395191179","issue_url":"https://api.github.com/repos/xaksis/vue-good-table/issues/296","id":395191179,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NTE5MTE3OQ==","user":{"login":"TheJaredWilcurt","id":4629794,"node_id":"MDQ6VXNlcjQ2Mjk3OTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/4629794?v=4","gravatar_id":"","url":"https://api.github.com/users/TheJaredWilcurt","html_url":"https://github.com/TheJaredWilcurt","followers_url":"https://api.github.com/users/TheJaredWilcurt/followers","following_url":"https://api.github.com/users/TheJaredWilcurt/following{/other_user}","gists_url":"https://api.github.com/users/TheJaredWilcurt/gists{/gist_id}","starred_url":"https://api.github.com/users/TheJaredWilcurt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheJaredWilcurt/subscriptions","organizations_url":"https://api.github.com/users/TheJaredWilcurt/orgs","repos_url":"https://api.github.com/users/TheJaredWilcurt/repos","events_url":"https://api.github.com/users/TheJaredWilcurt/events{/privacy}","received_events_url":"https://api.github.com/users/TheJaredWilcurt/received_events","type":"User","site_admin":false},"created_at":"2018-06-06T19:47:23Z","updated_at":"2018-06-06T19:47:23Z","author_association":"CONTRIBUTOR","body":"![event-log](https://user-images.githubusercontent.com/4629794/41061145-b1eb22ca-699f-11e8-9ad0-451bd4ec8218.png)\r\n\r\nI have a component (`baseTable.vue`) that is a wrapper for VGT.\r\n\r\nI have a Vuex module (`organizations.js`), that has a action (`getOrganizationAssets`) that makes a network request for data, then a mutation updates the state with the data that comes back.\r\n\r\nSo on page load, we run the action to get data, the data is placed on the state. The BaseTable component as a computed value that comes from the Vuex State. It passes this data into VGT. VGT takes in the data and initializesPagination. This triggers a `changePage` event to be ran twice, then a `pageChanged` to be ran twice, which then emits an `@on-page-change`, which baseTable.vue listens for, and then takes the event data, updates it's state and makes another network request expecting the pagination to have changed.\r\n\r\n```js\r\n  methods: {\r\n    onPageChange: function (evt) {\r\n      console.log(evt);\r\n      this.perPageLimit = evt.currentPerPage;\r\n      this.currentPage = evt.currentPage;\r\n      this.paginationOffset = (evt.currentPage - 1) * evt.currentPerPage;\r\n      this.getData();\r\n    },\r\n    onPerPageChange: function (evt) {\r\n      evt.currentPage = 1;\r\n      this.onPageChange(evt);\r\n    },\r\n  }\r\n```"}}
{"actor":{"display_login":"TheJaredWilcurt"}}