diff --git a/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js b/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js index e8598a6bfc4..2ac53e759b8 100644 --- a/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +++ b/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js @@ -544,12 +544,7 @@ type NativeType = HostComponent; type NativeCommands = TextInputNativeCommands; export const Commands: NativeCommands = codegenNativeCommands({ - supportedCommands: [ - 'focus', - 'blur', - 'setMostRecentEventCount', - 'setTextAndSelection', - ], + supportedCommands: ['focus', 'blur', 'setTextAndSelection'], }); let AndroidTextInputNativeComponent; diff --git a/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js b/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js index 950e5e1215c..a0dd8841123 100644 --- a/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js +++ b/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js @@ -22,12 +22,7 @@ type NativeType = HostComponent; type NativeCommands = TextInputNativeCommands; export const Commands: NativeCommands = codegenNativeCommands({ - supportedCommands: [ - 'focus', - 'blur', - 'setMostRecentEventCount', - 'setTextAndSelection', - ], + supportedCommands: ['focus', 'blur', 'setTextAndSelection'], }); const SinglelineTextInputNativeComponent: HostComponent = requireNativeComponent( diff --git a/Libraries/Components/TextInput/RCTSingelineTextInputNativeComponent.js b/Libraries/Components/TextInput/RCTSingelineTextInputNativeComponent.js index 78fcf530262..8a6f85756a6 100644 --- a/Libraries/Components/TextInput/RCTSingelineTextInputNativeComponent.js +++ b/Libraries/Components/TextInput/RCTSingelineTextInputNativeComponent.js @@ -24,12 +24,7 @@ type NativeType = HostComponent; type NativeCommands = TextInputNativeCommands; export const Commands: NativeCommands = codegenNativeCommands({ - supportedCommands: [ - 'focus', - 'blur', - 'setMostRecentEventCount', - 'setTextAndSelection', - ], + supportedCommands: ['focus', 'blur', 'setTextAndSelection'], }); let SinglelineTextInputNativeComponent; diff --git a/Libraries/Components/TextInput/TextInputNativeCommands.js b/Libraries/Components/TextInput/TextInputNativeCommands.js index d669b09f9d1..2584b7516c8 100644 --- a/Libraries/Components/TextInput/TextInputNativeCommands.js +++ b/Libraries/Components/TextInput/TextInputNativeCommands.js @@ -17,10 +17,6 @@ import type {Int32} from '../../Types/CodegenTypes'; export interface TextInputNativeCommands { +focus: (viewRef: React.ElementRef) => void; +blur: (viewRef: React.ElementRef) => void; - +setMostRecentEventCount: ( - viewRef: React.ElementRef, - eventCount: Int32, - ) => void; +setTextAndSelection: ( viewRef: React.ElementRef, mostRecentEventCount: Int32, @@ -30,11 +26,6 @@ export interface TextInputNativeCommands { ) => void; } -const supportedCommands = [ - 'focus', - 'blur', - 'setMostRecentEventCount', - 'setTextAndSelection', -]; +const supportedCommands = ['focus', 'blur', 'setTextAndSelection']; export default supportedCommands; diff --git a/Libraries/Text/TextInput/RCTBaseTextInputViewManager.m b/Libraries/Text/TextInput/RCTBaseTextInputViewManager.m index 97849119da0..dca143760a1 100644 --- a/Libraries/Text/TextInput/RCTBaseTextInputViewManager.m +++ b/Libraries/Text/TextInput/RCTBaseTextInputViewManager.m @@ -117,14 +117,6 @@ RCT_EXPORT_METHOD(blur : (nonnull NSNumber *)viewTag) }]; } -RCT_EXPORT_METHOD(setMostRecentEventCount : (nonnull NSNumber *)viewTag eventCount:(NSInteger)eventCount) -{ - [self.bridge.uiManager addUIBlock:^(RCTUIManager *uiManager, NSDictionary *viewRegistry) { - RCTBaseTextInputView *view = (RCTBaseTextInputView *)viewRegistry[viewTag]; - view.mostRecentEventCount = eventCount; - }]; -} - RCT_EXPORT_METHOD(setTextAndSelection : (nonnull NSNumber *)viewTag mostRecentEventCount : (NSInteger)mostRecentEventCount value : (NSString *)value diff --git a/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm b/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm index db40f71aaed..f309300051d 100644 --- a/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm @@ -407,11 +407,6 @@ using namespace facebook::react; [_backedTextInputView resignFirstResponder]; } -- (void)setMostRecentEventCount:(NSInteger)eventCount -{ - _mostRecentEventCount = eventCount; -} - - (void)setTextAndSelection:(NSInteger)eventCount value:(NSString *__nullable)value start:(NSInteger)start diff --git a/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputNativeCommands.h b/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputNativeCommands.h index db72f239f09..6af78ddf7e1 100644 --- a/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputNativeCommands.h +++ b/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputNativeCommands.h @@ -14,7 +14,6 @@ NS_ASSUME_NONNULL_BEGIN @protocol RCTTextInputViewProtocol - (void)focus; - (void)blur; -- (void)setMostRecentEventCount:(NSInteger)eventCount; - (void)setTextAndSelection:(NSInteger)eventCount value:(NSString *__nullable)value start:(NSInteger)start @@ -50,27 +49,6 @@ RCTTextInputHandleCommand(id componentView, NSString c return; } - if ([commandName isEqualToString:@"setMostRecentEventCount"]) { -#if RCT_DEBUG - if ([args count] != 1) { - RCTLogError( - @"%@ command %@ received %d arguments, expected %d.", @"TextInput", commandName, (int)[args count], 1); - return; - } -#endif - - NSObject *arg0 = args[0]; -#if RCT_DEBUG - if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSNumber class], @"number", @"TextInput", commandName, @"1st")) { - return; - } -#endif - NSInteger eventCount = [(NSNumber *)arg0 intValue]; - - [componentView setMostRecentEventCount:eventCount]; - return; - } - if ([commandName isEqualToString:@"setTextAndSelection"]) { #if RCT_DEBUG if ([args count] != 4) { diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java index 74c4a2ad7db..4bbbca32973 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java @@ -230,9 +230,6 @@ public class ReactTextInputManager extends BaseViewManager