File tree Expand file tree Collapse file tree 4 files changed +26
-0
lines changed
packages/react-native/Libraries Expand file tree Collapse file tree 4 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -1059,6 +1059,22 @@ interface TextInputState {
1059
1059
* noop if it wasn't focused
1060
1060
*/
1061
1061
blurTextInput ( textField ?: React . ElementRef < HostComponent < unknown > > ) : void ;
1062
+
1063
+ // [macOS
1064
+ /**
1065
+ * @param textField ref of the text field that was focused
1066
+ * Call on custom implementations of TextInput to notify the control was focused
1067
+ * noop if it was already focused
1068
+ */
1069
+ onTextInputFocus ( textField ?: React . ElementRef < HostComponent < unknown > > ) : void ;
1070
+
1071
+ /**
1072
+ * @param textField ref of the text field that was blurred
1073
+ * Call on custom implementations of TextInput to notify the control was blurred
1074
+ * noop if it wasn't focused
1075
+ */
1076
+ onTextInputBlur ( textField ?: React . ElementRef < HostComponent < unknown > > ) : void ;
1077
+ // macOS]
1062
1078
}
1063
1079
1064
1080
/**
Original file line number Diff line number Diff line change @@ -1223,6 +1223,8 @@ export type TextInputComponentStatics = $ReadOnly<{|
1223
1223
currentlyFocusedField : ( ) => ?number ,
1224
1224
focusTextInput : ( textField : ?ComponentRef ) => void ,
1225
1225
blurTextInput : ( textField : ?ComponentRef ) => void ,
1226
+ onTextInputFocus : ( textField : ?ComponentRef ) => void , // [macOS]
1227
+ onTextInputBlur : ( textField : ?ComponentRef ) => void , // [macOS]
1226
1228
| } > ,
1227
1229
| } > ;
1228
1230
Original file line number Diff line number Diff line change @@ -2013,6 +2013,8 @@ ExportedForwardRef.State = {
2013
2013
currentlyFocusedField : TextInputState . currentlyFocusedField ,
2014
2014
focusTextInput : TextInputState . focusTextInput ,
2015
2015
blurTextInput : TextInputState . blurTextInput ,
2016
+ onTextInputFocus : TextInputState . focusInput , // [macOS]
2017
+ onTextInputBlur : TextInputState . blurInput , // [macOS]
2016
2018
} ;
2017
2019
2018
2020
export type TextInputComponentStatics = $ReadOnly < { |
@@ -2021,6 +2023,8 @@ export type TextInputComponentStatics = $ReadOnly<{|
2021
2023
currentlyFocusedField : typeof TextInputState . currentlyFocusedField ,
2022
2024
focusTextInput : typeof TextInputState . focusTextInput ,
2023
2025
blurTextInput : typeof TextInputState . blurTextInput ,
2026
+ onTextInputFocus : typeof TextInputState . focusInput , // [macOS]
2027
+ onTextInputBlur : typeof TextInputState . blurInput , // [macOS]
2024
2028
| } > ,
2025
2029
| } > ;
2026
2030
Original file line number Diff line number Diff line change @@ -3164,6 +3164,8 @@ export type TextInputComponentStatics = $ReadOnly<{|
3164
3164
currentlyFocusedField: () => ?number,
3165
3165
focusTextInput: (textField: ?ComponentRef) => void,
3166
3166
blurTextInput: (textField: ?ComponentRef) => void,
3167
+ onTextInputFocus: (textField: ?ComponentRef) => void,
3168
+ onTextInputBlur: (textField: ?ComponentRef) => void,
3167
3169
|}>,
3168
3170
|}>;
3169
3171
export type TextInputType = React.AbstractComponent<
@@ -3553,6 +3555,8 @@ export type TextInputComponentStatics = $ReadOnly<{|
3553
3555
currentlyFocusedField: typeof TextInputState.currentlyFocusedField,
3554
3556
focusTextInput: typeof TextInputState.focusTextInput,
3555
3557
blurTextInput: typeof TextInputState.blurTextInput,
3558
+ onTextInputFocus: typeof TextInputState.focusInput,
3559
+ onTextInputBlur: typeof TextInputState.blurInput,
3556
3560
|}>,
3557
3561
|}>;
3558
3562
declare module.exports: TextInputType;
You can’t perform that action at this time.
0 commit comments