-
-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BottomSheet Component Fails to Function Correctly on Tab Switch or Route Navigation (using expo router) #2585
Comments
Screen_Recording_20240425_115640_Expo.Go.mp4 |
when navigating between tabs, it unmounts the content of that tab, which means the sheet is also unmounted! |
when starting switching tabs the bottom sheets doesn't open. Enregistrement.de.l.ecran.2024-04-25.a.14.50.49.mov<Tabs
defaultValue="tab1"
orientation="horizontal"
flexDirection="column"
width="100%"
>
<Tabs.List>
<Tabs.Tab value="tab1">
<Text>SubTab 1</Text>
</Tabs.Tab>
<Tabs.Tab value="tab2">
<Text>SubTab 2</Text>
</Tabs.Tab>
<Tabs.Tab value="tab3">
<Text>SubTab 3</Text>
</Tabs.Tab>
</Tabs.List>
<Tabs.Content
value="tab1"
padding={16}
key="contact-1"
>
<H5 key="contact-1">
<ContactSupport key="contact-1" />
</H5>
</Tabs.Content>
<Tabs.Content
value="tab2"
padding={16}
key="contact-2"
>
<H5 key="contact-2">
<ContactSupport key="contact-2" />
</H5>
</Tabs.Content>
<Tabs.Content
value="tab3"
padding={16}
key="contact-3r"
>
<H5 key="contact-3">
<ContactSupport key="contact-3" />
</H5>
</Tabs.Content>
</Tabs> |
dont know if it helps but this behaviour occurs only when the prop also, one dirty fix I've found is to wrap the const [isOpen, setIsOpen] = useState(false)
return <>
<Button onClick={() => setIsOpen(true)}>open</Button>
{isOpen && <Sheet open onOpenChange={setIsOpen}>...</Sheet>}
</> |
Current Behavior
The BottomSheet component, implemented to handle modal interactions, fails to behave as expected when switching tabs or navigating between routes. It appears that the state or visibility of the component does not update correctly in response to these navigation changes. The issue occurs consistently across all navigation actions that involve tab switches or route transitions.
Expected Behavior
should maintain its state and functionality across different navigation contexts. Switching tabs or routes
Tamagui Version
Platform (Web, iOS, Android)
Reproduction
https://github.com/boutchaz/tamagui-sheet-reproduce
System Info
The text was updated successfully, but these errors were encountered: