SteffeyDev / react-native-popover-view

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

Feels like it's slowly opening #91

Closed ajoykarmakar closed 3 years ago

ajoykarmakar commented 3 years ago

Describe the bug When I am clicking the button the popover opening animation looks slow. Like I have to wait half second but my animation duration in 200. Maybe the animation configuration is ease in out, Can we start the animation with linear animation style?

Device/Setup Info:

SteffeyDev commented 3 years ago

You can control the easing through the animationConfig prop. Please reference the README.

SteffeyDev commented 3 years ago

It is worth noting that the performance of the device is a factor here, as it has to complete one or two render and calculation cycles before the Popover animation actually starts. This is due to the complex nature of calculating the position and animation properties when the source button could be anywhere on the screen.

ajoykarmakar commented 3 years ago

Hello there, Thank you for the response. In the documentation - animationConfig = {{ duration: 600, easing: Easing.inOut(Easing.quad) })} But how should I implement the linear animation style? I can't found the appropriate options.

SteffeyDev commented 3 years ago

https://reactnative.dev/docs/easing

You will have to read up on RN Easing to find the function you want. The example in the README is just that, and example.