Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import Colors from 'styles/Colors';
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';
const {
ScrollView,
RefreshControl,
} = ReactNative;
/**
* An enhanced ScrollView component able to handle
**/
export default class EnhancedScrollView extends Component {
static propTypes = {
...ScrollView.propTypes,
...KeyboardAwareScrollView.propTypes,
// Call when pull to refresh is triggered
onRefresh: PropTypes.func,
};
constructor(props) {
super(props);
this._userPulledRefresh = false;
}
componentWillReceiveProps() {
this._userPulledRefresh = false;
}
render() {
const isRefreshing = this._userPulledRefresh;
return (
{ this._scrollview = c; this._root = c; }}
{...this.props}
>
{this.props.children}
);
}
}
Content.propTypes = {
...KeyboardAwareScrollView.propTypes,
style: React.PropTypes.object,
padder: React.PropTypes.bool,
disableKBDismissScroll: React.PropTypes.bool,
};
const StyledContent = connectStyle('NativeBase.Content', {}, mapPropsToStyleNames)(Content);
export {
StyledContent as Content,
};
render() {
return (
{ this._scrollview = c; this._root = c; }}
{...this.props}
>
{this.props.children}
);
}
}
Content.propTypes = {
...KeyboardAwareScrollView.propTypes,
style: React.PropTypes.object,
padder: React.PropTypes.bool,
disableKBDismissScroll: React.PropTypes.bool,
};
const StyledContent = connectStyle('NativeBase.Content', {}, mapPropsToStyleNames)(Content);
export {
StyledContent as Content,
};