From 35587da8ac4068ee0648a125af2b26bc8bf8558e Mon Sep 17 00:00:00 2001 From: ruifanyuan Date: Mon, 6 Nov 2023 14:34:19 +0800 Subject: [PATCH] fix(ios): reload textfield to take effect after altering returnKeyType --- .../renderer/component/textinput/NativeRenderTextField.m | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/renderer/native/ios/renderer/component/textinput/NativeRenderTextField.m b/renderer/native/ios/renderer/component/textinput/NativeRenderTextField.m index f5a28eaf4fb..9e27d5947c5 100644 --- a/renderer/native/ios/renderer/component/textinput/NativeRenderTextField.m +++ b/renderer/native/ios/renderer/component/textinput/NativeRenderTextField.m @@ -41,6 +41,13 @@ - (void)setKeyboardType:(UIKeyboardType)keyboardType { self.text = tempPwdStr; } +- (void)setReturnKeyType:(UIReturnKeyType) returnKeyType{ + [super setReturnKeyType:returnKeyType]; + if([self isFirstResponder]){ + [self reloadInputViews]; + } +} + - (void)setEditable:(BOOL)editable { _editable = editable; [self setEnabled:editable];