Page MenuHomePhabricator

D10001.diff
No OneTemporary

D10001.diff

diff --git a/native/account/registration/registration-text-input.react.js b/native/account/registration/registration-text-input.react.js
--- a/native/account/registration/registration-text-input.react.js
+++ b/native/account/registration/registration-text-input.react.js
@@ -10,6 +10,7 @@
useColors,
useKeyboardAppearance,
} from '../../themes/colors.js';
+import type { FocusEvent, BlurEvent } from '../../types/react-native.js';
type Props = React.ElementConfig<typeof TextInput>;
@@ -28,14 +29,14 @@
const [focused, setFocused] = React.useState(false);
const ourOnFocus = React.useCallback(
- event => {
+ (event: FocusEvent) => {
setFocused(true);
onFocus?.(event);
},
[onFocus],
);
const ourOnBlur = React.useCallback(
- event => {
+ (event: BlurEvent) => {
setFocused(false);
onBlur?.(event);
},
diff --git a/native/types/react-native.js b/native/types/react-native.js
--- a/native/types/react-native.js
+++ b/native/types/react-native.js
@@ -12,6 +12,7 @@
export type {
ContentSizeChangeEvent,
KeyPressEvent,
+ FocusEvent,
BlurEvent,
SelectionChangeEvent,
} from 'react-native/Libraries/Components/TextInput/TextInput.js';

File Metadata

Mime Type
text/plain
Expires
Wed, Dec 25, 9:05 PM (11 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2703171
Default Alt Text
D10001.diff (1 KB)

Event Timeline