Skip to content

Bolket/react-native-scrollview-smart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f41bcda · Oct 1, 2018

History

53 Commits
Jul 12, 2017
Jul 18, 2017
Apr 26, 2017
Jul 28, 2016
Jul 28, 2016
Jul 28, 2016
Apr 26, 2017
Jun 16, 2017
Aug 4, 2016
Jan 11, 2018
Oct 1, 2018
Jul 12, 2017
Jul 28, 2016
Jul 12, 2017
Jul 18, 2017
Jul 18, 2017

Repository files navigation

React Native Scrollview Smart CircleCI react-native-scrollview-smart npm version Known Vulnerabilities

A smart iOS and Android scrollview for React Native

INSTALLATION

npm i react-native-scrollview-smart --save

Android

in your `AndroidManifest.xml add:

<activity
  android:windowSoftInputMode="adjustPan" ... >

Demo

Usage

See the Example app

class Example extends Component {

  constructor(props) {
    super(props);
    this.scrollOnFocus = this.scrollOnFocus.bind(this);
  }

  scrollOnFocus = inputName => () => {
    this.scroll.inputFocused(
      findNodeHandle(this[inputName]),
    );
  }

  render() {
    return (
      <ScrollViewSmart
        ref={e => (this.scroll = e)}
      >
        <TextInput
          ref={e => (this.input = e)}
          onFocus={this.scrollOnFocus('input')}
        />
        // ...
      </ScrollViewSmart>
    );
  }
}

Donate

  • Etherium (ETH): 0x57b5ab33a339fc7fab86127981e4095b84d5ddfa