[fix] TextInput 'onKeyPress' return values

Match the current React Native API for 'onKeyPress'.

Fix #518
Close #537
This commit is contained in:
Kenneth Lynne
2017-06-22 17:53:34 -07:00
committed by Nicolas Gallagher
parent 4865c7bcce
commit 85b2afc313
3 changed files with 72 additions and 4 deletions

View File

@@ -103,8 +103,10 @@ Callback that is called when the text input is focused.
**onKeyPress**: ?function
Callback that is called when a key is pressed. Pressed key value is passed as
an argument to the callback handler. Fires before `onChange` callbacks.
Callback that is called when a key is pressed. This will be called with `{
nativeEvent: { key: keyValue } }` where keyValue is 'Enter` or 'Backspace' for
respective keys and the typed-in character otherwise including ' ' for space.
Fires before onChange callbacks.
**onSelectionChange**: ?function