From cd5fe06abe1b5f00f3e6edda453342266da6d36e Mon Sep 17 00:00:00 2001 From: David Vacca Date: Fri, 24 May 2019 11:22:09 -0700 Subject: [PATCH] Fix bottom sheet in Fabric Android Summary: This diff fixes the rendering of Bottom Sheet in Fabric Android. In D15343702 we added state as part of the "preallocateView" method but we forgot to call viewManager.updateState(), this prevents the state to be updated during the first render. Reviewed By: shergin Differential Revision: D15476042 fbshipit-source-id: cd6fc9bdd178589d2e04f85723425b5e5c3e5a04 --- .../com/facebook/react/fabric/mounting/MountingManager.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountingManager.java b/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountingManager.java index 5a2bb4924e0..43caf8fcfab 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountingManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountingManager.java @@ -193,6 +193,9 @@ public class MountingManager { viewManager = mViewManagerRegistry.get(componentName); view = mViewFactory.getOrCreateView(componentName, propsDiffMap, stateWrapper, themedReactContext); view.setId(reactTag); + if (stateWrapper != null) { + viewManager.updateState(view, stateWrapper); + } } ViewState viewState = new ViewState(reactTag, view, viewManager);