Przeglądaj źródła

Save props passed to TopTabs

fixes #312
Guy Carmeli 8 lat temu
rodzic
commit
bb708eda33
1 zmienionych plików z 4 dodań i 2 usunięć
  1. 4
    2
      src/platformSpecific.android.js

+ 4
- 2
src/platformSpecific.android.js Wyświetl plik

@@ -62,8 +62,6 @@ function dismissAllModals() {
62 62
 }
63 63
 
64 64
 function savePassProps(params) {
65
-  //TODO this needs to be handled in a common place,
66
-  //TODO also, all global passProps should be handled differently
67 65
   if (params.navigationParams && params.passProps) {
68 66
     PropRegistry.save(params.navigationParams.screenInstanceID, params.passProps);
69 67
   }
@@ -76,6 +74,10 @@ function savePassProps(params) {
76 74
     _.forEach(params.screen.topTabs, (tab) => savePassProps(tab));
77 75
   }
78 76
 
77
+  if (params.topTabs) {
78
+    _.forEach(params.topTabs, (tab) => savePassProps(tab));
79
+  }
80
+
79 81
   if (params.tabs) {
80 82
     _.forEach(params.tabs, (tab) => {
81 83
       tab.passProps = params.passProps;