Open daselang opened 9 months ago
Would it be possible to provide a repo that reproduces this issue?
Would it be possible to provide a repo that reproduces this issue?
@listenzz 目前没有在github上面弄个repo复现。就是 globalOption里面 ,假设 backgroundColor是黑色,Navigation.setDefaultOptions 在andriod上面生效,但是在IOS 上面,背景还是默认的白的。于是我只能在每个页面的withNavigationItem里面把 globalOption ...展开merge到单项里面才生效。 看上去像在android里面是 页面options与globalOptions是合并的。但是在ios里面是页面的options是直接replace了globalOptions.
iOS 也是 merge 的,我这边无法重现你说的问题
iOS 也是 merge 的,我这边无法重现你说的问题
sorry,我的代码并没有什么特殊的。现实的效果就是我描述的那样,andriod merged(correct),IOS replaced(incorrect)。最后只能用...globalOptions来统一merge了。如果不能复现,留意着吧。
version: "hybrid-navigation": "^2.16.6" "react-native": "0.72.4", Hi, I use
Navigation.setDefaultOptions(globalDefaultOptions);
beforeNavigation.startRegisterComponent(withRedux);
andNavigation.setRoot(navigationStack);
in android phone and simulator,it works well. but for IOS platform,setDefaultOptions
has no effect, in the scenario UI page, I should use the sample codes below to make multi-platforms work in same action.It seems that, the {XXX:YYY} in
withNavigationItem
merges with theglobalDefaultOptions
to generate a new option in android, but in IOS ,itreplaces
theglobalDefaultOptions
.so I have to use
...
to expand theglobalDefaultOptions
and merge the key-value pairs intowithNavigationItem({})
to make IOS taking effects,same code as in android.Do you what the root cause is?