Introducing "collapsable" prop as part of ViewProps
Summary: This diff introduces the collapsable props in the viewProps. This prop is used in product code to prevent specific Views to be removed from the view hierarchy Reviewed By: shergin Differential Revision: D10254679 fbshipit-source-id: 637665b8998a86e29e839eb6d405a0fac354c8d3
This commit is contained in:
parent
04fbdd347b
commit
95afdd8bb3
|
@ -67,7 +67,12 @@ ViewProps::ViewProps(const ViewProps &sourceProps, const RawProps &rawProps)
|
||||||
pointerEvents(
|
pointerEvents(
|
||||||
convertRawProp(rawProps, "pointerEvents", sourceProps.pointerEvents)),
|
convertRawProp(rawProps, "pointerEvents", sourceProps.pointerEvents)),
|
||||||
hitSlop(convertRawProp(rawProps, "hitSlop", sourceProps.hitSlop)),
|
hitSlop(convertRawProp(rawProps, "hitSlop", sourceProps.hitSlop)),
|
||||||
onLayout(convertRawProp(rawProps, "onLayout", sourceProps.onLayout)){};
|
onLayout(convertRawProp(rawProps, "onLayout", sourceProps.onLayout)),
|
||||||
|
collapsable(convertRawProp(
|
||||||
|
rawProps,
|
||||||
|
"collapsable",
|
||||||
|
sourceProps.collapsable,
|
||||||
|
true)){};
|
||||||
|
|
||||||
#pragma mark - Convenience Methods
|
#pragma mark - Convenience Methods
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,8 @@ class ViewProps : public Props,
|
||||||
const EdgeInsets hitSlop{};
|
const EdgeInsets hitSlop{};
|
||||||
const bool onLayout{};
|
const bool onLayout{};
|
||||||
|
|
||||||
|
const bool collapsable{true};
|
||||||
|
|
||||||
#pragma mark - Convenience Methods
|
#pragma mark - Convenience Methods
|
||||||
|
|
||||||
BorderMetrics resolveBorderMetrics(bool isRTL) const;
|
BorderMetrics resolveBorderMetrics(bool isRTL) const;
|
||||||
|
|
Loading…
Reference in New Issue