diff --git a/ReactCommon/fabric/components/text/paragraph/ParagraphComponentDescriptor.h b/ReactCommon/fabric/components/text/paragraph/ParagraphComponentDescriptor.h index 499490db685..7e7974b42ef 100644 --- a/ReactCommon/fabric/components/text/paragraph/ParagraphComponentDescriptor.h +++ b/ReactCommon/fabric/components/text/paragraph/ParagraphComponentDescriptor.h @@ -71,6 +71,8 @@ class ParagraphComponentDescriptor final paragraphShadowNode->setMeasureCache( measureCache_ ? measureCache_.get() : nullptr); + paragraphShadowNode->dirtyLayout(); + // All `ParagraphShadowNode`s must have leaf Yoga nodes with properly // setup measure function. paragraphShadowNode->enableMeasurement(); diff --git a/ReactCommon/fabric/components/view/yoga/YogaLayoutableShadowNode.cpp b/ReactCommon/fabric/components/view/yoga/YogaLayoutableShadowNode.cpp index 26b870d0d0e..7b198efc687 100644 --- a/ReactCommon/fabric/components/view/yoga/YogaLayoutableShadowNode.cpp +++ b/ReactCommon/fabric/components/view/yoga/YogaLayoutableShadowNode.cpp @@ -141,6 +141,7 @@ void YogaLayoutableShadowNode::setSize(Size size) const { style.dimensions[YGDimensionWidth] = yogaStyleValueFromFloat(size.width); style.dimensions[YGDimensionHeight] = yogaStyleValueFromFloat(size.height); yogaNode_.setStyle(style); + yogaNode_.setDirty(true); } void YogaLayoutableShadowNode::setPositionType( @@ -150,6 +151,7 @@ void YogaLayoutableShadowNode::setPositionType( auto style = yogaNode_.getStyle(); style.positionType = positionType; yogaNode_.setStyle(style); + yogaNode_.setDirty(true); } void YogaLayoutableShadowNode::layout(LayoutContext layoutContext) {