[change] TextInput 'onKeyPress' includes modifier keys

Include modifier keys in the 'nativeEvent'. This allows keyboard
shortcuts such as "Shift+Enter" to be implemented for submiting text
input content when the modality is keyboard + mouse rather than touch.
This commit is contained in:
Nicolas Gallagher
2017-06-23 14:48:34 -07:00
parent dfa8087f9a
commit e9101abefe
3 changed files with 42 additions and 6 deletions

View File

@@ -106,7 +106,8 @@ Callback that is called when the text input is focused.
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.
Modifier keys are also included in the nativeEvent. Fires before onChange
callbacks.
**onSelectionChange**: ?function