Skip to content

Commit

Permalink
Set RootNodeKind trait in ModalHostViewShadowNode
Browse files Browse the repository at this point in the history
Summary:
Changelog: [internal]

`ModalHostViewShadowNode` didn't have `RootNodeKit` trait, therefore `getRelativeLayoutMetrics`  was including nodes in ancestors that it shouldn't have.

Reviewed By: shergin

Differential Revision: D20735801

fbshipit-source-id: 6b81e3b174c2f82e530abc2bca2da8bebc2270b0
  • Loading branch information
sammy-SC authored and facebook-github-bot committed Mar 31, 2020
1 parent 8d3d8af commit c381518
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ReactCommon/fabric/components/modal/ModalHostViewShadowNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ class ModalHostViewShadowNode final : public ConcreteViewShadowNode<
ModalHostViewState> {
public:
using ConcreteViewShadowNode::ConcreteViewShadowNode;

static ShadowNodeTraits BaseTraits() {
auto traits = ConcreteViewShadowNode::BaseTraits();
traits.set(ShadowNodeTraits::Trait::RootNodeKind);
return traits;
}
};

} // namespace react
Expand Down

0 comments on commit c381518

Please sign in to comment.