react-native/Examples
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
..
2048 Add flag "-lc++" for all checked-in projects 2016-04-22 16:23:18 -07:00
Movies Fix Examples/{UIExplorer,Movies} 2016-06-20 08:43:29 -07:00
TicTacToe Add flag "-lc++" for all checked-in projects 2016-04-22 16:23:18 -07:00
UIExplorer Implement TextInput onContentSizeChange 2016-07-07 09:00:01 -07:00
.eslintrc Add global flow types to eslint globals 2016-01-27 15:55:34 -08:00