gluestack-ui
gluestack-ui copied to clipboard
Select/Actionsheet doesn't work on rn 0.78.0
Description
Select/Actionsheet doesn't work on rn 0.78.0
CodeSandbox/Snack link
Not necessary to be provided for the time
Steps to reproduce
- follow the document 0.1. the example from https://gluestack.io/ui/docs/components/actionsheet
- Click 'Open Actionsheet'
- show
actionsheet - can't click/press anything, also can't click backdrop
gluestack-ui Version
v2 (i'm not sure i just follow https://gluestack.io/ui/docs/home/getting-started/installation)
Platform
- [ ] Expo
- [x] React Native CLI
- [ ] Next
- [ ] Web
- [ ] Android
- [x] iOS
Other Platform
No response
Additional Information
"@gluestack-ui/actionsheet": "^0.2.52", "@gluestack-ui/button": "^1.0.14", "@gluestack-ui/icon": "^0.1.26", "@gluestack-ui/nativewind-utils": "^1.0.26", "@gluestack-ui/overlay": "^0.1.22", "@gluestack-ui/select": "^0.1.31", "@gluestack-ui/toast": "^1.0.9",
@colmugx , We've tested this on our end, and it's working as expected. Could you provide a reproducible example where you're facing the issue? It’s possible that the onClose function is missing or not being used correctly.
wha..at? I've not changed anything.
here is minimal example: https://github.com/colmugx/gluestack_actionsheet_issue_with_repack
wha..at? I've not changed anything.
here is minimal example: https://github.com/colmugx/gluestack_actionsheet_issue_with_repack
@Sanchitv3 @vaibhk20
wha..at? I've not changed anything. here is minimal example: https://github.com/colmugx/gluestack_actionsheet_issue_with_repack
Thanks for sharing the minimal example! We're looking into this issue and will update you soon.
same issue here,
<Actionsheet useRNModal={true}>
seems to make it work again for me
<SelectPortal useRNModal={true} >
also fixed the issue with Select
@MathiasGilson @DKbyo No.. you guys can try with my minimal example
I tried you guys' idea, it is not works for me.
MORE DETAIL: it would open the sheet, but you can't do anything on the actionsheet
I had the same problem, but for me, the problem has the imported lib, looks like the folder doesn't exist:
If you're using Gluestack, you can work around this issue by customizing the backdrop with a Pressable to handle closing the ActionSheet manually. Here's a quick example:
const closeModal = () => {
setIsOpen(false)
}
.......
<Actionsheet isOpen={isOpen}>
<Pressable
onPress={closeModal}
style={{ position: 'absolute', top: 0, left: 0, right: 0, bottom: 0 }}
>
<ActionsheetBackdrop />
</Pressable>
{/* ...your content */}
</Actionsheet>
If you're using Gluestack, you can work around this issue by customizing the backdrop with a Pressable to handle closing the ActionSheet manually. Here's a quick example:如果您使用的是 Gluestack,可以通过自定义背景幕布并使用 Pressable 按钮来手动关闭 ActionSheet 来解决此问题。以下是一个简单的示例:
const closeModal = () => { setIsOpen(false) }.......
<Actionsheet isOpen={isOpen}> <Pressable onPress={closeModal} style={{ position: 'absolute', top: 0, left: 0, right: 0, bottom: 0 }} > <ActionsheetBackdrop /> </Pressable> {/* ...your content */} </Actionsheet>
@dipenkhatri7 but the problem is we can't press any item in astionsheet/select because the model's interaction layer is behind the "main screen"