0

I have two problems that seem to be related. I'm using a MaterialTopTabNavigator with tabBarScrollEnabled. It works fine when I initially have my screens under it. But in my final screen I have a button that marks the flow "complete", which should update the top tab navigator to not list the previous tabs. That part all works surprisingly well, but I'm running into 2 issues on iOS (possibly android as well, but I only have a simulator for that and it appears to work correctly there). The first is that after clicking the complete button it drops to the proper single tab at the top, but it still allows scroll to the left, which then throws an exception that "undefined is not an object (evaluating 'state.routes[index].name')". The second is that if I click complete, and then click it again to mark it incomplete again the Screen stays on the "Final" screen, but the Top Tab Navigator shows that it is in on the first screen, and if I scroll left it pops the same "undefined is not an object (evaluating 'state.routes[index].name').

I've attempted to reduce the issue to the following snack: https://snack.expo.dev/@linkeddg/materialtoptabnavigator-issue?platform=ios

mwhited
  • 1
  • 2

0 Answers0