Skip to content

Bolket/react-native-scrollview-smart

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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