Parcourir la source

Support passing unserializable props to custom navBar component

Guy Carmeli il y a 7 ans
Parent
révision
c07c5bdb5d
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  1. 5
    0
      src/deprecated/platformSpecificDeprecated.android.js

+ 5
- 0
src/deprecated/platformSpecificDeprecated.android.js Voir le fichier

225
   if (_.isUndefined(ret.expendCollapsingToolBarOnTopTabChange)) {
225
   if (_.isUndefined(ret.expendCollapsingToolBarOnTopTabChange)) {
226
     ret.expendCollapsingToolBarOnTopTabChange = true;
226
     ret.expendCollapsingToolBarOnTopTabChange = true;
227
   }
227
   }
228
+  if (ret.topBarReactViewInitialProps) {
229
+    const passPropsKey = _.uniqueId('customNavBarComponent');
230
+    PropRegistry.save(passPropsKey, ret.topBarReactViewInitialProps);
231
+    ret.topBarReactViewInitialProps = {passPropsKey};  
232
+  }
228
   return ret;
233
   return ret;
229
 }
234
 }
230
 
235