Package Exports
- react-native-scrollable-input
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-native-scrollable-input) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
React Native Scrollable TextInput
[![Build Status][build-badge]][build] [![Version][version-badge]][package] [![MIT License][license-badge]][license]
A cross-platform TextInput component for React Native. This is a JavaScript-only implementation of React-Native TextInput.
Features
- Fix the problem of scrolling RTL TextInput in a ScrollView Component for Android & iOS (Specially Android)
Installation
$ npm install react-native-scrollable-input --saveQuick Start
import React, { Component } from 'react';
import { View, ScrollView, StyleSheet } from 'react-native';
import InputText from 'react-native-scrollable-input';
export default class TabViewExample extends React.Component
{
state = {
text: '',
tempList: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
}
render ()
{
return (
<View style={styles.container}>
<ScrollView>
{this.state.tempList.map ((item, index) => {
return (
<InputText
value={this.state.text}
onChangeText={(value) => this.setState ({text: value})}
style={styles.input}
containerStyle={styles.inputContainer}
placeholder='اینجا بنویسید ...'
/>
);
})}
</ScrollView>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
},
inputContainer: {
// Custom style for Container of InputText
}
});