{"action":"created","issue":{"url":"https://api.github.com/repos/skv-headless/react-native-scrollable-tab-view/issues/237","repository_url":"https://api.github.com/repos/skv-headless/react-native-scrollable-tab-view","labels_url":"https://api.github.com/repos/skv-headless/react-native-scrollable-tab-view/issues/237/labels{/name}","comments_url":"https://api.github.com/repos/skv-headless/react-native-scrollable-tab-view/issues/237/comments","events_url":"https://api.github.com/repos/skv-headless/react-native-scrollable-tab-view/issues/237/events","html_url":"https://github.com/skv-headless/react-native-scrollable-tab-view/issues/237","id":147316337,"number":237,"title":"onChangeTab called twice","user":{"login":"uyson","id":248634,"avatar_url":"https://avatars.githubusercontent.com/u/248634?v=3","gravatar_id":"","url":"https://api.github.com/users/uyson","html_url":"https://github.com/uyson","followers_url":"https://api.github.com/users/uyson/followers","following_url":"https://api.github.com/users/uyson/following{/other_user}","gists_url":"https://api.github.com/users/uyson/gists{/gist_id}","starred_url":"https://api.github.com/users/uyson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uyson/subscriptions","organizations_url":"https://api.github.com/users/uyson/orgs","repos_url":"https://api.github.com/users/uyson/repos","events_url":"https://api.github.com/users/uyson/events{/privacy}","received_events_url":"https://api.github.com/users/uyson/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-04-11T05:00:52Z","updated_at":"2016-07-21T16:16:44Z","closed_at":"2016-04-17T07:17:05Z","body":"why onChangeTab function called on tab change.?  is this a bug?"},"comment":{"url":"https://api.github.com/repos/skv-headless/react-native-scrollable-tab-view/issues/comments/234304870","html_url":"https://github.com/skv-headless/react-native-scrollable-tab-view/issues/237#issuecomment-234304870","issue_url":"https://api.github.com/repos/skv-headless/react-native-scrollable-tab-view/issues/237","id":234304870,"user":{"login":"SudoPlz","id":3070948,"avatar_url":"https://avatars.githubusercontent.com/u/3070948?v=3","gravatar_id":"","url":"https://api.github.com/users/SudoPlz","html_url":"https://github.com/SudoPlz","followers_url":"https://api.github.com/users/SudoPlz/followers","following_url":"https://api.github.com/users/SudoPlz/following{/other_user}","gists_url":"https://api.github.com/users/SudoPlz/gists{/gist_id}","starred_url":"https://api.github.com/users/SudoPlz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SudoPlz/subscriptions","organizations_url":"https://api.github.com/users/SudoPlz/orgs","repos_url":"https://api.github.com/users/SudoPlz/repos","events_url":"https://api.github.com/users/SudoPlz/events{/privacy}","received_events_url":"https://api.github.com/users/SudoPlz/received_events","type":"User","site_admin":false},"created_at":"2016-07-21T16:16:44Z","updated_at":"2016-07-21T16:16:44Z","body":"This created another problem. Now When onMomentumScrollEnd runs, and the `this.state.currentPage` is not updated yet, that will result on \r\n```js\r\n  onMomentumScrollEnd={(e) => {\r\n            const offsetX = e.nativeEvent.contentOffset.x;\r\n            const page = Math.round(offsetX / this.state.containerWidth);\r\n            if(this.state.currentPage != page){\r\n              this._updateSelectedPage(page); //<-- This part\r\n            }\r\n          }}\r\n```\r\nthis part of the code running and thus resulting on a second onChangeTab called, with the wrong page provided...! Now that a bug!"}}
{"actor":{"display_login":"SudoPlz"}}