Skip to content

Commit d69e550

Browse files
yungstersfacebook-github-bot
authored andcommittedApr 19, 2018
RN: Support flexWrap: 'wrap-reverse'
Reviewed By: fkgozali Differential Revision: D7684403 fbshipit-source-id: 6c247ba86b8ad1bb4dcc8f44f5609c939afe0f06
1 parent 654435d commit d69e550

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed
 

‎Libraries/StyleSheet/LayoutPropTypes.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,8 @@ var LayoutPropTypes = {
432432
*/
433433
flexWrap: ReactPropTypes.oneOf([
434434
'wrap',
435-
'nowrap'
435+
'nowrap',
436+
'wrap-reverse'
436437
]),
437438

438439
/** `justifyContent` aligns children in the main direction.

‎Libraries/StyleSheet/StyleSheetTypes.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export type ____LayoutStyle_Internal = $ReadOnly<{|
5757
borderTopWidth?: number,
5858
position?: 'absolute' | 'relative',
5959
flexDirection?: 'row' | 'row-reverse' | 'column' | 'column-reverse',
60-
flexWrap?: 'wrap' | 'nowrap',
60+
flexWrap?: 'wrap' | 'nowrap' | 'wrap-reverse',
6161
justifyContent?:
6262
| 'flex-start'
6363
| 'flex-end'

‎React/Base/RCTConvert.m

+2-1
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,8 @@ + (NSPropertyList)NSPropertyList:(id)json
685685

686686
RCT_ENUM_CONVERTER(YGWrap, (@{
687687
@"wrap": @(YGWrapWrap),
688-
@"nowrap": @(YGWrapNoWrap)
688+
@"nowrap": @(YGWrapNoWrap),
689+
@"wrap-reverse": @(YGWrapWrapReverse)
689690
}), YGWrapNoWrap, intValue)
690691

691692
RCT_ENUM_CONVERTER(RCTPointerEvents, (@{

‎ReactAndroid/src/main/java/com/facebook/react/uimanager/LayoutShadowNode.java

+4
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,10 @@ public void setFlexWrap(@Nullable String flexWrap) {
315315
setFlexWrap(YogaWrap.WRAP);
316316
break;
317317
}
318+
case "wrap-reverse": {
319+
setFlexWrap(YogaWrap.WRAP_REVERSE);
320+
break;
321+
}
318322
default: {
319323
throw new JSApplicationIllegalArgumentException(
320324
"invalid value for flexWrap: " + flexWrap);

0 commit comments

Comments
 (0)
Please sign in to comment.