0.1.5 • Published 7 years ago

react-native-scrollview-smart v0.1.5

Weekly downloads
9
License
MIT
Repository
github
Last release
7 years ago

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

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>
    );
  }
}
0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago

0.0.1-rc2

8 years ago

0.0.1-rc1

8 years ago

0.0.1-rc

8 years ago