fix: tab press listeners reset stack to index - fixes stale detail screen from cross-tab navigation
This commit is contained in:
@@ -29,7 +29,10 @@ export default function AppLayout() {
|
||||
/>
|
||||
<Tabs.Screen
|
||||
name="clients"
|
||||
options={{ title: 'Clients', tabBarIcon: ({ color }) => <Icon name="users" size={22} color={color} />, unmountOnBlur: true }}
|
||||
options={{ title: 'Clients', tabBarIcon: ({ color }) => <Icon name="users" size={22} color={color} /> }}
|
||||
listeners={({ navigation }: any) => ({
|
||||
tabPress: () => { navigation.navigate('clients', { screen: 'index' }); },
|
||||
})}
|
||||
/>
|
||||
<Tabs.Screen
|
||||
name="payments"
|
||||
@@ -37,7 +40,10 @@ export default function AppLayout() {
|
||||
/>
|
||||
<Tabs.Screen
|
||||
name="tasks"
|
||||
options={{ title: 'Tickets', tabBarIcon: ({ color }) => <Icon name="ticket" size={22} color={color} />, unmountOnBlur: true }}
|
||||
options={{ title: 'Tickets', tabBarIcon: ({ color }) => <Icon name="ticket" size={22} color={color} /> }}
|
||||
listeners={({ navigation }: any) => ({
|
||||
tabPress: () => { navigation.navigate('tasks', { screen: 'index' }); },
|
||||
})}
|
||||
/>
|
||||
<Tabs.Screen
|
||||
name="profile"
|
||||
|
||||
Reference in New Issue
Block a user