SteffeyDev / react-native-popover-view

A well-tested, adaptable, lightweight <Popover> component for react-native
MIT License
613 stars 92 forks source link

Popover not showing when given "from" property #113

Closed 321hendrik closed 2 years ago

321hendrik commented 3 years ago

Describe the bug I tried the basic example code below to show a popover from an element, but the popover is not showing. Passing a ref also does not work. The popover shows when not using the from property or passing a predetermined position.

<Popover
  debug={true}
  from={(
    <TouchableOpacity>
      <Text>Press here to open popover!</Text>
    </TouchableOpacity>
  )}>
  <Text>This is the contents of the popover</Text>
</Popover>

Device/Setup Info:

Debug Output

LOG  [2021-08-10T06:09:43.532Z] calculateRectFromRef - waiting for ref
LOG  [2021-08-10T06:09:43.532Z] calculateRectFromRef - waiting for ref to move
SteffeyDev commented 2 years ago

What's your environment? I just plugged this into an Expo snack and it worked fine.

SteffeyDev commented 2 years ago

I tried to stand up a non-expo environment, but it looks like the default react native template has issues building iOS, so I'm not able to test that unfortunately. However, I'd be very surprised if non-expo RN works differently than expo RN for a module that doesn't depend on any native features.

SteffeyDev commented 2 years ago

Closing due to lack of activity