Fix excessive emits of keyboardDidShow event on iOS#54551
Fix excessive emits of keyboardDidShow event on iOS#54551IslamRustamov wants to merge 1 commit intofacebook:mainfrom
Conversation
|
Maybe this even can be written like this: upd: Also I believe that we should write: instead of because RCTNSStringFromString will return "" in case of empty inputAccessoryViewID, so when we set inputAccessoryViewID and then remove it - those if cases will execute (because "" in Objective-C is true) Correct me if I'm wrong |
🤖 Automated Code Review📊 Pull Request Review SummaryOverviewThis pull request addresses an issue related to excessive emissions of the 🎯 Key Findings
🔍 Detailed Issues🔴 Critical IssuesNo critical issues found. 🟠 High Priority IssuesNo high priority issues found. 🟡 Medium Priority IssuesNo medium priority issues found. 🟢 Low Priority IssuesNo low priority issues found. ✅ Positive Aspects
📝 Overall AssessmentThis pull request provides a clear and effective solution to the issue of excessive ✅ No issues found! Code looks good.Generated by PR Review Agent |
Summary:
This PR fixes this issue: #54542
When we assign inputAccessoryViewID prop to TextInput - setDefaultInputAccessoryView is being called on every prop check, which is calling reloadInputViews, which is causing keyboardDidShow event to be emitted again and again.
Changelog:
[IOS] [FIXED] - Moved if condition related to inputAccessoryViewID in a different place to reduce reloadInputViews calls
Test Plan:
Use the most basic listener to check how often the event is being fired:
Would be appreciated if anyone hinted whether this change might cause the "input views were not reloaded at the right time" problem.