Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TextInput -
selection
prop is not set on component creation
Summary: **Problem:** `selection` prop is not being set on component creation. Not quite sure which RN version this issue was introduced but fixing it on latest code. Use playground for testing (refer to following diff) **Proposed Solution:** Added notes in comments but `viewCommands.setTextAndSelection()` is called only on text or selection update which relies on comparing data with `lastNativeSelection`. Problem is that `lastNativeSelection` is initially set to the props value that is passed in so does not send the command on component creation. So assign a default selection value of `{start: -1, end: -1}` so it can be set on component creation. **Changelog:** [General][Fixed] - 'selection` prop in `TextInput` was not being applied at component creation Differential Revision: D56911712
- Loading branch information