File tree Expand file tree Collapse file tree
packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -300,6 +300,13 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared &
300300
301301 if (newTextInputProps.inputAccessoryViewID != oldTextInputProps.inputAccessoryViewID ) {
302302 _backedTextInputView.inputAccessoryViewID = RCTNSStringFromString (newTextInputProps.inputAccessoryViewID );
303+
304+ // InputAccessoryView component sets the inputAccessoryView when inputAccessoryViewID exists
305+ if (_backedTextInputView.inputAccessoryViewID ) {
306+ if (_backedTextInputView.isFirstResponder ) {
307+ [_backedTextInputView reloadInputViews ];
308+ }
309+ }
303310 }
304311
305312 if (newTextInputProps.inputAccessoryViewButtonLabel != oldTextInputProps.inputAccessoryViewButtonLabel ) {
@@ -639,9 +646,6 @@ - (void)setDefaultInputAccessoryView
639646{
640647 // InputAccessoryView component sets the inputAccessoryView when inputAccessoryViewID exists
641648 if (_backedTextInputView.inputAccessoryViewID ) {
642- if (_backedTextInputView.isFirstResponder ) {
643- [_backedTextInputView reloadInputViews ];
644- }
645649 return ;
646650 }
647651
You can’t perform that action at this time.
0 commit comments