Nick Lockwood 329c716897 Fixed bug where layoutSubviews was called continuously for scrollview
Summary:
RCTScrollView was calling `dockClosestSectionHeader` in `reactBridgeDidFinishTransaction`, which triggers a layout update. The reason for this was in case the `stickyHeaderIndexes` property was updated, which would require the headers to be adjusted.

However, doing this in `reactBridgeDidFinishTransaction` had the affect of causing `layoutSubviews` to be called repeatedly every frame even if nothing had changed and the scrollview wasn't moving, which was especially expensive when combined with the `removeClippedSubviews` logic, that loops through every view to calculate if it needs to be clipped.

This fix moves the `dockClosestSectionHeader` call into `didUpdateProps`, and checks that the stickyHeaderIndexes have actually changed before calling it.

Reviewed By: javache

Differential Revision: D3387607

fbshipit-source-id: c71e00c6fac48337a63d7fee7c7c23e016acf24e
2016-06-06 05:28:31 -07:00
..
2016-01-07 12:03:17 -08:00
2016-04-28 16:00:32 -07:00
2016-04-28 16:00:32 -07:00
2015-12-08 03:32:30 -08:00
2015-12-08 03:32:30 -08:00
2015-12-08 03:32:30 -08:00
2015-06-03 09:49:35 -08:00
2016-05-31 04:13:32 -07:00
2015-03-26 02:42:24 -08:00
2016-02-16 16:51:39 -08:00
2016-05-10 10:51:24 -07:00
2016-04-22 08:15:25 -07:00
2016-04-22 08:15:25 -07:00
2016-04-22 08:15:25 -07:00
2016-03-22 10:58:29 -07:00