react-native/Libraries/Text
Janic Duplessis f0a3c56048 Add TextInput controlled selection prop on iOS
Summary:
This adds support for a controlled `selection` prop on `TextInput` on iOS (Android PR coming soon). This is based on the work by ehd in #2668 which hasn't been updated for a while, kept the original commit and worked on fixing what was missing based on the feedback in the original PR.

What I changed is:
- Make the prop properly controlled by JS
- Add a RCTTextSelection class to map the JS object into and the corresponding RCTConvert category
- Make sure the selection change event is properly triggered when the input is focused
- Cleanup setSelection
- Changed TextInput to use function refs to appease the linter

** Test plan **
Tested using the TextInput selection example in UIExplorer on iOS.
Also tested that it doesn't break Android.
Closes https://github.com/facebook/react-native/pull/8958

Differential Revision: D3771229

Pulled By: javache

fbshipit-source-id: b8ede46b97fb3faf3061bb2dac102160c4b20ce7
2016-08-25 17:28:37 -07:00
..
RCTText.xcodeproj Add TextInput controlled selection prop on iOS 2016-08-25 17:28:37 -07:00
__mocks__ Update to 14.0 2016-07-27 22:13:26 -07:00
RCTRawTextManager.h [ReactNative] Expanded license on obj-c files 2015-03-23 13:18:29 -08:00
RCTRawTextManager.m Convert alloc/init to new to please linter 2015-08-17 08:46:00 -07:00
RCTShadowRawText.h [ReactNative] Expanded license on obj-c files 2015-03-23 13:18:29 -08:00
RCTShadowRawText.m Move dirty layout into css-layout 2016-07-25 03:58:41 -07:00
RCTShadowText.h Initial implementation of adjustsFontSizeToFit. 2016-08-10 11:28:37 -07:00
RCTShadowText.m Centre text in case where the distance between baselines is larger th… 2016-08-11 16:58:33 -07:00
RCTText.h Initial implementation of adjustsFontSizeToFit. 2016-08-10 11:28:37 -07:00
RCTText.m Initial implementation of adjustsFontSizeToFit. 2016-08-10 11:28:37 -07:00
RCTTextField.h Open sourced the onSelectionChange event 2015-11-14 09:44:30 -08:00
RCTTextField.m Add TextInput controlled selection prop on iOS 2016-08-25 17:28:37 -07:00
RCTTextFieldManager.h Migrated RCTText into FBReactKit 2015-07-08 07:13:00 -08:00
RCTTextFieldManager.m Add TextInput controlled selection prop on iOS 2016-08-25 17:28:37 -07:00
RCTTextManager.h Add support for multiline TextInput via UITextView 2015-04-29 01:33:58 -08:00
RCTTextManager.m Initial implementation of adjustsFontSizeToFit. 2016-08-10 11:28:37 -07:00
RCTTextSelection.h Add TextInput controlled selection prop on iOS 2016-08-25 17:28:37 -07:00
RCTTextSelection.m Add TextInput controlled selection prop on iOS 2016-08-25 17:28:37 -07:00
RCTTextView.h Implement TextInput onContentSizeChange 2016-07-07 09:00:01 -07:00
RCTTextView.m Add TextInput controlled selection prop on iOS 2016-08-25 17:28:37 -07:00
RCTTextViewManager.h Add support for multiline TextInput via UITextView 2015-04-29 01:33:58 -08:00
RCTTextViewManager.m Add TextInput controlled selection prop on iOS 2016-08-25 17:28:37 -07:00
Text.js Initial implementation of adjustsFontSizeToFit. 2016-08-10 11:28:37 -07:00
TextStylePropTypes.js Mark Text style fontVariant as iOS only 2016-08-25 16:13:53 -07:00
TextUpdateTest.js Fix up this pattern var React = require('react-native'); 2016-04-08 20:37:22 -07:00