gluestack-ui icon indicating copy to clipboard operation
gluestack-ui copied to clipboard

Select/Actionsheet doesn't work on rn 0.78.0

Open colmugx opened this issue 8 months ago • 10 comments

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

  1. follow the document 0.1. the example from https://gluestack.io/ui/docs/components/actionsheet

Image

Image

  1. Click 'Open Actionsheet'
  2. show actionsheet
  3. 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 avatar Mar 24 '25 12:03 colmugx

@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.

Sanchitv3 avatar Mar 27 '25 07:03 Sanchitv3

wha..at? I've not changed anything.

here is minimal example: https://github.com/colmugx/gluestack_actionsheet_issue_with_repack

colmugx avatar Mar 30 '25 05:03 colmugx

wha..at? I've not changed anything.

here is minimal example: https://github.com/colmugx/gluestack_actionsheet_issue_with_repack

@Sanchitv3 @vaibhk20

colmugx avatar Apr 02 '25 04:04 colmugx

wha..at? I've not changed anything. here is minimal example: https://github.com/colmugx/gluestack_actionsheet_issue_with_repack

@Sanchitv3 @vaibhk20

Thanks for sharing the minimal example! We're looking into this issue and will update you soon.

Sanchitv3 avatar Apr 02 '25 04:04 Sanchitv3

same issue here,

<Actionsheet useRNModal={true}>

seems to make it work again for me

MathiasGilson avatar Apr 15 '25 13:04 MathiasGilson

<SelectPortal useRNModal={true} > also fixed the issue with Select

DKbyo avatar Apr 18 '25 21:04 DKbyo

@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

colmugx avatar Apr 19 '25 07:04 colmugx

I had the same problem, but for me, the problem has the imported lib, looks like the folder doesn't exist:

Image

Image

alvesxdani avatar Apr 23 '25 20:04 alvesxdani

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>

dipenkhatri7 avatar Apr 24 '25 22:04 dipenkhatri7

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"

colmugx avatar Apr 25 '25 02:04 colmugx