1.0.4 • Published 5 years ago

react-native-textinput-multiline v1.0.4

Weekly downloads
59
License
-
Repository
-
Last release
5 years ago

react-native-textinput-multiline

The fix proposed on this library has been merged to the react-native v0.60, so this library is not recommended for version 0.60+

This library is just a temporary workaround for the TextInput multiline bug. It's not meant to be used for production as it relies on native React Native implementation and that could change between versions.

This library is meant to be used to fix an Android Native bug that prevents the input from breaking line when set to multiline and a numeric keyboardType. On iOS it just provides the native TextInput from react-native, and on Android it extends the default React Native TextInput to provide the bug fix.

Getting started

$ npm install react-native-textinput-multiline --save

Mostly automatic installation

$ react-native link react-native-textinput-multiline

Manual installation

iOS

There is no need for iOS installations as it exposes the native React Native TextInput on that platform.

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.muritavo.RNReactNativeTextinputMultilinePackage; to the imports at the top of the file
  • Add new RNReactNativeTextinputMultilinePackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-textinput-multiline'
    project(':react-native-textinput-multiline').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-textinput-multiline/android')
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-textinput-multiline')

Usage

import TextInput from 'react-native-textinput-multiline';

render() {
	return (
		<TextInput
			keyboardType="numeric"
			multiline={true}/>
	)
}
1.0.4

5 years ago

1.0.3

5 years ago

1.0.3-rc2

5 years ago

1.0.3-rc1

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago