Skip to content

Commit

Permalink
Include transform in OUTER_PROPS (#26611)
Browse files Browse the repository at this point in the history
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 #26181

## Changelog
[Android] [Fixed] - Fixed issue with refresh control not working properly on an inverted ScrollView
Pull Request resolved: #26611

Test Plan: Updated unit test in splitLayoutProps-test.js.

Differential Revision: D17661079

Pulled By: cpojer

fbshipit-source-id: 747da27b11c3ca59b7f639f393ae5ac137f5490a
  • Loading branch information
migbot authored and facebook-github-bot committed Sep 30, 2019
1 parent 9a2bc71 commit 0a282c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Libraries/StyleSheet/__tests__/splitLayoutProps-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
`);
Expand Down
1 change: 1 addition & 0 deletions Libraries/StyleSheet/splitLayoutProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const OUTER_PROPS = Object.assign(Object.create(null), {
right: true,
bottom: true,
top: true,
transform: true,
});

function splitLayoutProps(
Expand Down

0 comments on commit 0a282c4

Please sign in to comment.