How to use react-native-keyboard-aware-scroll-view - 10 common examples

To help you get started, we’ve selected a few react-native-keyboard-aware-scroll-view examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bitnami-labs / cabin / src / components / commons / ScrollView.js View on Github external
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;
github syousif94 / frugalmaps / buncha / components / SubmitForm.js View on Github external
import SubmitPlacePicker from "./SubmitPlacePicker";
import { useSelector, useDispatch } from "react-redux";
import SubmissionReset from "./SubmissionReset";
import SegmentedControl from "./SegmentedControl";
import { useDimensions } from "../utils/Hooks";
import SubmitSegmentItem from "./SubmitSegmentItem";
import TimeInput from "./TimeInput";
import SubmitFormButton from "./SubmitFormButton";
import SubmitDeleteButton from "./SubmitDeleteButton";
import SubmitResetButton from "./SubmitResetButton";

export const FORM_WIDTH = 520;

let ScrollComponent = ScrollView;
if (!WEB) {
  ScrollComponent = require("react-native-keyboard-aware-scroll-view")
    .KeyboardAwareScrollView;
}

const MOBILE_PROPS = WEB
  ? {}
  : {
      extraHeight: 50,
      extraScrollHeight: 0,
      enableResetScrollToCoords: false,
      showsVerticalScrollIndicator: false,
      viewIsInsideTabBar: true
    };

const ConnectedInput = memo(({ field, ...props }) => {
  const dispatch = useDispatch();
  const value = useSelector(state => state.submission[field]);
github GeekyAnts / NativeBase / dist / src / backward / Widgets / Content.js View on Github external
Content=function(_NativeBaseComponent){_inherits(Content,_NativeBaseComponent);function Content(){_classCallCheck(this,Content);return _possibleConstructorReturn(this,(Content.__proto__||Object.getPrototypeOf(Content)).apply(this,arguments));}_createClass(Content,[{key:'render',value:function render()
{var _this2=this;
return(
_react2.default.createElement(_reactNativeKeyboardAwareScrollView.KeyboardAwareScrollView,_extends({
automaticallyAdjustContentInsets:false,
contentContainerStyle:this.props.contentContainerStyle,
resetScrollToCoords:this.props.disableKBDismissScroll?null:{x:0,y:0},
ref:function ref(c){_this2._scrollview=c;_this2._root=c;}},
this.props),

this.props.children));


}}]);return Content;}(_NativeBaseComponent3.default);
github GeekyAnts / NativeBase / dist / Components / Widgets / Content / index.js View on Github external
}},{key:'render',value:function render()

{var _this2=this;
var contentContainerStyle=this.props.contentContainerStyle||{};
contentContainerStyle.padding=this.props.padder?this.getTheme().contentPadding:0;
return(
_react2.default.createElement(_reactNativeKeyboardAwareScrollView.KeyboardAwareScrollView,_extends({automaticallyAdjustContentInsets:false,ref:function ref(c){_this2._scrollview=c;_this2._root=c;}},this.prepareRootProps(),{contentContainerStyle:contentContainerStyle}),this.props.children));

}}]);return Content;}(_NativeBaseComponent3.default);exports.default=Content;
//# sourceMappingURL=index.js.map
github GeekyAnts / NativeBase / dist / src / basic / Content.js View on Github external
Content=function(_Component){_inherits(Content,_Component);function Content(){_classCallCheck(this,Content);return _possibleConstructorReturn(this,(Content.__proto__||Object.getPrototypeOf(Content)).apply(this,arguments));}_createClass(Content,[{key:'render',value:function render()
{var _this2=this;
return(
_react2.default.createElement(_reactNativeKeyboardAwareScrollView.KeyboardAwareScrollView,_extends({
automaticallyAdjustContentInsets:false,
resetScrollToCoords:this.props.disableKBDismissScroll?null:{x:0,y:0},
ref:function ref(c){_this2._scrollview=c;_this2._root=c;}},
this.props),

this.props.children));


}}]);return Content;}(_react.Component);
github GeekyAnts / NativeBase / dist / src / backward / Widgets / Content.js View on Github external
Content=function(_NativeBaseComponent){_inherits(Content,_NativeBaseComponent);function Content(){_classCallCheck(this,Content);return _possibleConstructorReturn(this,(Content.__proto__||Object.getPrototypeOf(Content)).apply(this,arguments));}_createClass(Content,[{key:'render',value:function render()
{var _this2=this;
return(
_react2.default.createElement(_reactNativeKeyboardAwareScrollView.KeyboardAwareScrollView,_extends({
automaticallyAdjustContentInsets:false,
contentContainerStyle:this.props.contentContainerStyle,
resetScrollToCoords:this.props.disableKBDismissScroll?null:{x:0,y:0},
ref:function ref(c){_this2._scrollview=c;_this2._root=c;}},
this.props),

this.props.children));


}}]);return Content;}(_NativeBaseComponent3.default);
github GeekyAnts / NativeBase / dist / src / basic / Content.js View on Github external
{var _this2=this;
return(
_react2.default.createElement(_reactNativeKeyboardAwareScrollView.KeyboardAwareScrollView,_extends({
automaticallyAdjustContentInsets:false,
resetScrollToCoords:this.props.disableKBDismissScroll?null:{x:0,y:0},
ref:function ref(c){_this2._scrollview=c;_this2._root=c;}},
this.props),

this.props.children));


}}]);return Content;}(_react.Component);


Content.propTypes=_extends({},
_reactNativeKeyboardAwareScrollView.KeyboardAwareScrollView.propTypes,{
style:_react2.default.PropTypes.object,
padder:_react2.default.PropTypes.bool,
disableKBDismissScroll:_react2.default.PropTypes.bool,
enableResetScrollToCoords:_react2.default.PropTypes.bool});


var StyledContent=(0,_theme.connectStyle)('NativeBase.Content',{},_mapPropsToStyleNames2.default)(Content);exports.


Content=StyledContent;
//# sourceMappingURL=Content.js.map
github GeekyAnts / NativeBase / dist / src / backward / Widgets / Content.js View on Github external
return(
_react2.default.createElement(_reactNativeKeyboardAwareScrollView.KeyboardAwareScrollView,_extends({
automaticallyAdjustContentInsets:false,
contentContainerStyle:this.props.contentContainerStyle,
resetScrollToCoords:this.props.disableKBDismissScroll?null:{x:0,y:0},
ref:function ref(c){_this2._scrollview=c;_this2._root=c;}},
this.props),

this.props.children));


}}]);return Content;}(_NativeBaseComponent3.default);


Content.propTypes=_extends({},
_reactNativeKeyboardAwareScrollView.KeyboardAwareScrollView.propTypes,{
style:_react2.default.PropTypes.object,
padder:_react2.default.PropTypes.bool,
disableKBDismissScroll:_react2.default.PropTypes.bool});


var StyledContent=(0,_nativeBaseShoutemTheme.connectStyle)('NativeBase.Content',{},_mapPropsToStyleNames2.default)(Content);exports.


Content=StyledContent;
//# sourceMappingURL=Content.js.map
github GeekyAnts / NativeBase / src / backward / Widgets / Content.js View on Github external
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,
};
github GeekyAnts / NativeBase / components / Content.js View on Github external
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,
};

react-native-keyboard-aware-scroll-view

A React Native ScrollView component that resizes when the keyboard appears.

MIT
Latest version published 3 years ago

Package Health Score

64 / 100
Full package analysis