From 4c5d30769745c69f2a5a6c6b91e474f223c98bca Mon Sep 17 00:00:00 2001 From: Mauricio Gonzalez Salcedo Date: Thu, 13 Jun 2019 23:59:08 -0500 Subject: [PATCH 1/2] FCBH-123 --- package.json | 5 ++++- viewpager/ViewPager.js | 7 ++++--- yarn.lock | 8 ++++++++ 3 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 yarn.lock diff --git a/package.json b/package.json index 4119d541..c1a84554 100644 --- a/package.json +++ b/package.json @@ -32,5 +32,8 @@ "bugs": { "url": "https://github.com/zbtang/React-Native-ViewPager/issues" }, - "homepage": "https://github.com/zbtang/React-Native-ViewPager#readme" + "homepage": "https://github.com/zbtang/React-Native-ViewPager#readme", + "dependencies": { + "@react-native-community/viewpager": "^1.1.7" + } } diff --git a/viewpager/ViewPager.js b/viewpager/ViewPager.js index 732db756..dd6816bb 100644 --- a/viewpager/ViewPager.js +++ b/viewpager/ViewPager.js @@ -4,7 +4,8 @@ 'use strict' -import { PanResponder, Platform, ScrollView, StyleSheet, View, ViewPagerAndroid } from 'react-native' +import { PanResponder, Platform, ScrollView, StyleSheet, View, ViewPager } from 'react-native' +import ViewPager from '@react-native-community/viewpager'; import React, { Component } from 'react' const SCROLLVIEW_REF = 'scrollView' @@ -16,7 +17,7 @@ const SCROLL_STATE = { dragging: 'dragging' } export default class ViewPager extends Component { - static propTypes = {...ViewPagerAndroid.propTypes} + static propTypes = {...ViewPager.propTypes} static defaultProps = { initialPage: 0, @@ -59,7 +60,7 @@ export default class ViewPager extends Component { render () { return (this.props.forceScrollView || Platform.OS === 'ios') ? this._renderOnIOS() : ( - Date: Fri, 14 Jun 2019 00:04:02 -0500 Subject: [PATCH 2/2] FCBH-123 --- viewpager/ViewPager.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/viewpager/ViewPager.js b/viewpager/ViewPager.js index dd6816bb..eee7d3c4 100644 --- a/viewpager/ViewPager.js +++ b/viewpager/ViewPager.js @@ -4,8 +4,8 @@ 'use strict' -import { PanResponder, Platform, ScrollView, StyleSheet, View, ViewPager } from 'react-native' -import ViewPager from '@react-native-community/viewpager'; +import { PanResponder, Platform, ScrollView, View } from 'react-native' +import RNCViewPager from '@react-native-community/viewpager'; import React, { Component } from 'react' const SCROLLVIEW_REF = 'scrollView' @@ -17,7 +17,7 @@ const SCROLL_STATE = { dragging: 'dragging' } export default class ViewPager extends Component { - static propTypes = {...ViewPager.propTypes} + static propTypes = {...RNCViewPager.propTypes} static defaultProps = { initialPage: 0, @@ -60,7 +60,7 @@ export default class ViewPager extends Component { render () { return (this.props.forceScrollView || Platform.OS === 'ios') ? this._renderOnIOS() : ( -