File tree Expand file tree Collapse file tree
rn-tester/js/examples/KeyboardEventsExample Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -594,7 +594,8 @@ function InternalTextInput(props: TextInputProps): React.Node {
594594 } ;
595595
596596 // [macOS
597- const _keyDownEvents = legacyKeyOverrides ?. keyDownEvents ?? props . keyDownEvents ;
597+ const _keyDownEvents =
598+ legacyKeyOverrides ?. keyDownEvents ?? props . keyDownEvents ;
598599 const _keyUpEvents = legacyKeyOverrides ?. keyUpEvents ?? props . keyUpEvents ;
599600 const _origOnKeyDown = legacyKeyOverrides ?. onKeyDown ?? props . onKeyDown ;
600601 const _origOnKeyUp = legacyKeyOverrides ?. onKeyUp ?? props . onKeyUp ;
Original file line number Diff line number Diff line change @@ -45,7 +45,8 @@ export default component View(
4545 let actualView ;
4646
4747 // [macOS
48- const _keyDownEvents = legacyKeyOverrides ?. keyDownEvents ?? props . keyDownEvents ;
48+ const _keyDownEvents =
49+ legacyKeyOverrides ?. keyDownEvents ?? props . keyDownEvents ;
4950 const _keyUpEvents = legacyKeyOverrides ?. keyUpEvents ?? props . keyUpEvents ;
5051 const _origOnKeyDown = legacyKeyOverrides ?. onKeyDown ?? props . onKeyDown ;
5152 const _origOnKeyUp = legacyKeyOverrides ?. onKeyUp ?? props . onKeyUp ;
Original file line number Diff line number Diff line change @@ -109,8 +109,7 @@ export default function processLegacyKeyProps(
109109): LegacyKeyResult {
110110 const validKeysDown : ?$ReadOnlyArray < LegacyHandledKeyEvent > =
111111 props . validKeysDown ;
112- const validKeysUp : ?$ReadOnlyArray < LegacyHandledKeyEvent > =
113- props . validKeysUp ;
112+ const validKeysUp : ?$ReadOnlyArray < LegacyHandledKeyEvent > = props . validKeysUp ;
114113 const passthroughAllKeyEvents : ?boolean = props . passthroughAllKeyEvents ;
115114
116115 const hasModernKeyDown = props . keyDownEvents != null ;
@@ -123,10 +122,8 @@ export default function processLegacyKeyProps(
123122 const gateKeyUp =
124123 ! hasModernKeyUp && validKeysUp != null && ! legacyPassthrough ;
125124
126- const normalizedDown =
127- props . keyDownEvents ?? normalize ( validKeysDown ) ;
128- const normalizedUp =
129- props . keyUpEvents ?? normalize ( validKeysUp ) ;
125+ const normalizedDown = props . keyDownEvents ?? normalize ( validKeysDown ) ;
126+ const normalizedUp = props . keyUpEvents ?? normalize ( validKeysUp ) ;
130127
131128 const keyDownEvents = legacyPassthrough ? undefined : normalizedDown ;
132129 const keyUpEvents = legacyPassthrough ? undefined : normalizedUp ;
Original file line number Diff line number Diff line change @@ -314,9 +314,9 @@ function LegacyValidKeysExample(): React.Node {
314314 return (
315315 < View style = { { marginTop : 10 } } >
316316 < Text style = { styles . description } >
317- These components use the legacy validKeysDown / validKeysUp props. The JS
318- compat layer converts them to modern keyDownEvents / keyUpEvents under
319- the hood.
317+ These components use the legacy validKeysDown / validKeysUp props. The
318+ JS compat layer converts them to modern keyDownEvents / keyUpEvents
319+ under the hood.
320320 </ Text >
321321
322322 < View style = { styles . inputContainer } >
You can’t perform that action at this time.
0 commit comments