react-native/Libraries
Janic Duplessis 2537157d99 Implement TextInput onContentSizeChange
Summary:
This adds proper support for tracking a TextInput content size as discussed in #6552 by adding a new callback that is called every time the content size changes including when first rendering the view.

Some points that are up for discussion are what do we want to do with the onChange callback as I don't see any use left for it now that we can track text change in onChangeText and size changes in onContentSizeChange. Also a bit off topic but should we consider renaming onChangeText to onTextChange to keep the naming more consistent (see [this naming justification](https://twitter.com/notbrent/status/709445076850597888)).

This is split in 2 commits for easier review, one for iOS and one for android.

The iOS implementation simply checks if the content size has changed everytime we update it and fire the callback, the only small issue was that the content size had several different values on initial render so I added a check to not fire events before the layoutSubviews where at this point the value is g
Closes https://github.com/facebook/react-native/pull/8457

Differential Revision: D3528202

Pulled By: dmmiller

fbshipit-source-id: fefe83f10cc5bfde1f5937c48c88b10408e58d9d
2016-07-07 09:00:01 -07:00
..
ART Remove `node_modules/react` from the list of discoverable haste modules 2016-07-05 06:44:33 -07:00
ActionSheetIOS Update RCTActionSheetManager.m 2016-06-04 16:28:19 -07:00
AdSupport Text highlighting on iOS 2015-07-24 08:41:58 -08:00
Animated Remove `node_modules/react` from the list of discoverable haste modules 2016-07-05 06:44:33 -07:00
AppRegistry Remove `node_modules/react` from the list of discoverable haste modules 2016-07-05 06:44:33 -07:00
AppState Updated AppState module to use new emitter system 2016-05-23 09:13:37 -07:00
BatchedBridge Update some JS in preparation for some Jest updates. 2016-06-30 01:58:40 -07:00
BugReporting Unrevert D3518381 2016-07-06 12:58:41 -07:00
CameraRoll Unrevert D3518381 2016-07-06 12:58:41 -07:00
Components Implement TextInput onContentSizeChange 2016-07-07 09:00:01 -07:00
CustomComponents Unrevert D3518381 2016-07-06 12:58:41 -07:00
DebugComponentHierarchy Move React Core Integration to a Dependency 2016-04-21 09:28:23 -07:00
Devtools Remove `node_modules/react` from the list of discoverable haste modules 2016-07-05 06:44:33 -07:00
EventEmitter Fixes EventEmitter#once arguments not getting passed to the listener 2016-06-28 16:13:21 -07:00
Experimental Unrevert D3518381 2016-07-06 12:58:41 -07:00
Fetch Reverted commit D3503958 2016-07-01 13:13:32 -07:00
Geolocation Update RCTNetworking, RCTNetInfo and RCTLocationManager to use new events system 2016-05-25 04:28:36 -07:00
Image Remove `node_modules/react` from the list of discoverable haste modules 2016-07-05 06:44:33 -07:00
Inspector Remove `node_modules/react` from the list of discoverable haste modules 2016-07-05 06:44:33 -07:00
Interaction Remove `node_modules/react` from the list of discoverable haste modules 2016-07-05 06:44:33 -07:00
JavaScriptAppEngine Remove iOS platform check for running devtools 2016-07-01 04:28:48 -07:00
LayoutAnimation Remove `node_modules/react` from the list of discoverable haste modules 2016-07-05 06:44:33 -07:00
Linking Hook up Android intent to Linking.js #7079 2016-06-05 18:58:24 -07:00
LinkingIOS Updated Linking and PushNotificationIOS modules to use NativeEventEmitter 2016-05-27 10:28:23 -07:00
Modal Remove `node_modules/react` from the list of discoverable haste modules 2016-07-05 06:44:33 -07:00
NativeAnimation Harmonize native animation callback args with JS 2016-07-05 11:13:23 -07:00
NavigationExperimental BugFix: Title should be from scene.route.title 2016-06-30 17:58:25 -07:00
Network v0.27.0: fbsource 2016-06-13 14:28:25 -07:00
PushNotificationIOS Added logging to push registration failure. 2016-06-18 08:58:20 -07:00
QuickPerformanceLogger added QPL for main interactions 2015-09-29 22:25:23 -07:00
RCTTest Add UIGraphicsPush/PopContext to prevent lost reference during snapshot testing 2016-06-14 09:58:41 -07:00
RKBackendNode Move React Core Integration to a Dependency 2016-04-21 09:28:23 -07:00
ReactIOS Remove `node_modules/react` from the list of discoverable haste modules 2016-07-05 06:44:33 -07:00
ReactNative Move React Core Integration to a Dependency 2016-04-21 09:28:23 -07:00
Sample Remove knowledge of fbjs from the packager 2016-03-02 04:28:38 -08:00
Settings Updated AppState module to use new emitter system 2016-05-23 09:13:37 -07:00
Storage Update AsyncStorage doc 2016-06-24 08:43:36 -07:00
StyleSheet Unrevert D3518381 2016-07-06 12:58:41 -07:00
Text Implement TextInput onContentSizeChange 2016-07-07 09:00:01 -07:00
Utilities Remove `node_modules/react` from the list of discoverable haste modules 2016-07-05 06:44:33 -07:00
Vibration Add support for vibration patterns 2016-03-29 21:45:20 -07:00
WebSocket Add ping to WebSocket 2016-07-05 05:58:23 -07:00
react-native Remove `node_modules/react` from the list of discoverable haste modules 2016-07-05 06:44:33 -07:00
vendor Fixed NativeEventListener deregistration 2016-05-16 04:13:56 -07:00
Promise.js Remove knowledge of fbjs from the packager 2016-03-02 04:28:38 -08:00
promiseRejectionIsError.js Add possibility to `console.error`/redbox on promise rejections 2016-03-15 05:22:22 -07:00