THIS PACKAGE IS NO LONGER MAINTAINED SINCE 2018 AND DOES NOT WORK WITH LATEST REACT NATIVE
A react native extendsion which allows you to control TextInput better.
The original name is react-native-keyboard-toolbar, because the latest add some features, I think the old name is not suitable for this package.
0.3.7 - Now support RN 0.40
0.3.6 - New feature of setPickerRowByIndex
and reloadPickerData
by @DaveAdams88
0.2.5 - Added the fully support of multiline
<TextInput/>
0.2.1 - Added the support of tintColor
, which can set the cursor color
0.2 - Added the support of dismissKeyboard
, moveCursorToLast
and setSelection
0.1 - Added the support of setting an UIPickerView
as the inputView
- Adding
UITabBarItem
(s) into the keyboard of<TextInput/>
- Adding a
UIPickerView
as a default keyboard of<TextInput/>
- Setting the selection area or cursor using only two parameters, which are
start
andlength
The PickerIOS
Component in React Native 0.13 cannot be styled well outside NavigatorIOS
This extension does not support <TextInput/>
with multiline={true}
, and I need some time to figure out. If you got some idea, it will really welcome to send me a PR.
I am still very simple to use
cd
to your React Native project directory and run
npm install react-native-textinput-utils --save
Download and open the RCTTextInputUtilsDemo.xcodeproj
file, and runs.
You might need to add the es7.classProperties
into your PROJECT_ROOT/npm_modules/react-native/packager/transformer.js
and PROJECT_ROOT/npm_modules/react-native/packager/react-packager/.babelrc
- In XCode, in the project navigator right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-textinput-utils
and ADDRCTTextInputUtils.xcodeproj
- Drag
libRCTKeyboardToolbar.a
(from 'Products' under RCTTextInputUtils.xcodeproj) intoGeneral
➜Linked Frameworks and Libraries
phase. (GIF below) - Run your project (
Cmd+R
)
var RCTKeyboardToolbarTextInput = require('react-native-textinput-utils');
<RCTKeyboardToolbarTextInput
leftButtonText='I_AM_CANCEL_BUTTON'
rightButtonText='I_AM_DONE_BUTTON'
onCancel={(dismissKeyboard)=>dismissKeyboard()}
onDone={(dismissKeyboard)=>dismissKeyboard