Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3529749
D10001.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D10001.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D10001: [Flow202][native][skip-ci] [17/x] Type TextInput onFocus/onBlur
Attached
Detach File
Event Timeline
Log In to Comment