From b944381bb4ec1e926f321ae57fbaf0461bdd905c Mon Sep 17 00:00:00 2001 From: Miguel Alatzar Date: Sun, 29 Sep 2019 18:48:03 -0700 Subject: [PATCH] Include transform in OUTER_PROPS (#26611) Summary: Without `transform` in `OUTER_PROPS`, the refresh control component would not include `transform: {scaleY: -1}` in its style and so pulling down, rather than up, on a scroll view would trigger a refresh. Fixes https://github.com/facebook/react-native/issues/26181 ## Changelog [Android] [Fixed] - Fixed issue with refresh control not working properly on an inverted ScrollView Pull Request resolved: https://github.com/facebook/react-native/pull/26611 Test Plan: Updated unit test in splitLayoutProps-test.js. Differential Revision: D17661079 Pulled By: cpojer fbshipit-source-id: 747da27b11c3ca59b7f639f393ae5ac137f5490a --- Libraries/StyleSheet/__tests__/splitLayoutProps-test.js | 5 ++++- Libraries/StyleSheet/splitLayoutProps.js | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Libraries/StyleSheet/__tests__/splitLayoutProps-test.js b/Libraries/StyleSheet/__tests__/splitLayoutProps-test.js index 70b2877ae2c..0bb9a1a1994 100644 --- a/Libraries/StyleSheet/__tests__/splitLayoutProps-test.js +++ b/Libraries/StyleSheet/__tests__/splitLayoutProps-test.js @@ -13,11 +13,14 @@ const splitLayoutProps = require('../splitLayoutProps'); test('splits style objects', () => { - const style = {width: 10, margin: 20, padding: 30}; + const style = {width: 10, margin: 20, padding: 30, transform: {scaleY: -1}}; const {outer, inner} = splitLayoutProps(style); expect(outer).toMatchInlineSnapshot(` Object { "margin": 20, + "transform": Object { + "scaleY": -1, + }, "width": 10, } `); diff --git a/Libraries/StyleSheet/splitLayoutProps.js b/Libraries/StyleSheet/splitLayoutProps.js index 700fbea437f..ab4197cc45e 100644 --- a/Libraries/StyleSheet/splitLayoutProps.js +++ b/Libraries/StyleSheet/splitLayoutProps.js @@ -36,6 +36,7 @@ const OUTER_PROPS = Object.assign(Object.create(null), { right: true, bottom: true, top: true, + transform: true, }); function splitLayoutProps(