[TextInput] How to show "Done" button above "number-pad" keyboard?
Hello,
I'm trying to implement the following screen:

How can I get the bar above the keyboard to show up with "Done" button?
<TextInput
style={styles.codeInput}
placeholder="Enter Code"
value={this.state.pinCode}
keyboardType="number-pad"
onChangeText={(code) => this.setState({pinCode: code})}
/>
@ranyefet - you could listen to keyboard events and set the position of your Done button accordingly when it opens: https://github.com/johanneslumpe/react-native-keyboardevents - there may be a more elegant way but this will work
You want what's called the input accessory but it's not yet built yet.
@brentvatne @ide Thanks for the comments. The reason why I wanted the "Done" button is because in the iOS Simulator I wasn't able to close the keypad by clicking anywhere on the screen. The only way to close the keypad was to hit Return on my mac keyboard. I haven't tested it yet on a real device, so I'm not sure what will happen there.
Do you know If this is a bug with the simulator, or do I need to implement this functionality with code?
You should implement/configure it in code. The keyboard is very manual on iOS. ScrollView has some prop that lets you auto-dismiss the keyboard that you might want to look into.
I'm working on adding the inputAccessoryView on IOS. I'll update this issue when I have a PR.
Let's collapse this issue into #371
@auser Are you still working on inputAccessoryView?
+1
+1
+1
As a temporary workaround I found this lib which works pretty well, but forces you to have the separated files (ex. component.ios.js & component.android.ios) for the components which use it: https://github.com/DickyT/react-native-textinput-utils
I just made a keyboard dismissing component for number keyboard on iOS called DoneBar if anyone wants to give it a try.
+1 still looking forward
+1
+1
+1
+1
+1
+1
Here is implementation for this feature https://gist.github.com/chih/3aa8b3bbd490137a31f0b864eff1532e Now we just need someone to make PR out of it :)
Here is also video on the implementation https://www.youtube.com/watch?v=RuzHai2RVZU