mirror of
https://github.com/zhigang1992/react-native-web.git
synced 2026-04-23 04:00:04 +08:00
[add] TextInput onKeyPress support for arrow keys
Close #791 Close #792
This commit is contained in:
@@ -220,10 +220,11 @@ const TextInputScreen = () => (
|
||||
Callback that is called when a key is pressed. This will be called with{' '}
|
||||
<Code>{`{
|
||||
nativeEvent: { key: keyValue } }`}</Code>{' '}
|
||||
where keyValue is <Code>Enter</Code> or <Code>Backspace</Code> for respective keys and
|
||||
the typed-in character otherwise including <Code>' '</Code>
|
||||
for space. Modifier keys (e.g., <Code>shiftKey</Code>) are also included in the{' '}
|
||||
<Code>nativeEvent</Code>. Fires before <Code>onChange</Code> callbacks.
|
||||
where keyValue is <Code>Enter</Code>, <Code>Backspace</Code>, <Code>Tab</Code>,{' '}
|
||||
<Code>{'Arrow{Up,Right,Down,Left}'}</Code> for respective keys and the typed-in
|
||||
character otherwise including <Code>' '</Code> for space. Modifier keys (e.g.,{' '}
|
||||
<Code>shiftKey</Code>) are also included in the <Code>nativeEvent</Code>. Fires before{' '}
|
||||
<Code>onChange</Code> callbacks.
|
||||
</AppText>
|
||||
}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user