Correctly translate nowrap -> NO_WRAP
Summary: The java enum was recently changed from NOWRAP -> NO_WRAP so the translation from js failed. This fixes that. Reviewed By: limichaelc Differential Revision: D4186869 fbshipit-source-id: fe35211a6632d80356d35a01a079279ef4bd7006
This commit is contained in:
parent
7e8bef872a
commit
a07abe7188
|
@ -86,8 +86,13 @@ public class LayoutShadowNode extends ReactShadowNode {
|
||||||
|
|
||||||
@ReactProp(name = ViewProps.FLEX_WRAP)
|
@ReactProp(name = ViewProps.FLEX_WRAP)
|
||||||
public void setFlexWrap(@Nullable String flexWrap) {
|
public void setFlexWrap(@Nullable String flexWrap) {
|
||||||
setFlexWrap(
|
if (flexWrap == null || flexWrap.equals("nowrap")) {
|
||||||
flexWrap == null ? CSSWrap.NO_WRAP : CSSWrap.valueOf(flexWrap.toUpperCase(Locale.US)));
|
setFlexWrap(CSSWrap.NO_WRAP);
|
||||||
|
} else if (flexWrap.equals("wrap")) {
|
||||||
|
setFlexWrap(CSSWrap.WRAP);
|
||||||
|
} else {
|
||||||
|
throw new IllegalArgumentException("Unknown flexWrap value: " + flexWrap);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ReactProp(name = ViewProps.ALIGN_SELF)
|
@ReactProp(name = ViewProps.ALIGN_SELF)
|
||||||
|
|
Loading…
Reference in New Issue