SteffeyDev / react-native-popover-view

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

Setting 'from' prop from ref to null while open #89

Closed kokosin4ik closed 2 years ago

kokosin4ik commented 4 years ago

Hi 👋

I have a strange issue. In my case (Mode.Rn_Modal) i have from={flag ? anchorRef : null }. So when my popover is rendered with anchor for some element, there is a case when I want to show popover at the center without anchor and without rerender children. But now nothing happens when i change the from prop in runtime. Only when I have closed and opened it again it appears at the center without acnhor.

Can you help me? Is it a bug or expected behaviour?

SteffeyDev commented 4 years ago

I believe this is expected behavior, I never intended for the from prop to be changed while the popover is open, and most likely don't have any code reacting to the change. However, I can consider this as a feature request if that is indeed what you are looking for.

kokosin4ik commented 4 years ago

It will be great. We really need such behavior, it will help us a lot.

SteffeyDev commented 2 years ago

I was able to get this working, this will be included in 5.0

SteffeyDev commented 2 years ago

Version 5.0.0 released, which includes support for this feature