Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix TextInput value not restoring after reuse
Summary: Changelog: [Internal] # Problem The problem was setting `_backedTextInputView.attributedText` to nil inside `[RCTTextInputComponentView prepareForRecycle]`. Ordinarily this isn't a problem becase `UIManager::updateState` drops the update if the ShadowNode no longer exists. But in certain cases the ShadowNode can exist, empty string being set as its value # Fix Fix is trivial, invalidate state before nullifying `_backedTextInputView`. This prevents the state update from being dispatched. # Discussion We should go over all other components and make sure state is invalidated as first thing in `[RCTViewComponentView prepareForRecycle]`. Reviewed By: shergin Differential Revision: D23324929 fbshipit-source-id: 9568e920d99683ad95f965ef4b63c529f50f3283
- Loading branch information