alexkatz / react-tiny-popover

A simple and highly customizable popover react higher order component with no other dependencies! Typescript friendly.
MIT License
454 stars 121 forks source link

Preserve popover align when reposition #181

Closed pdambrauskas closed 1 year ago

pdambrauskas commented 1 year ago

I've noticed, that when I use contentLocation for custom popover positioning, it keeps re-rendering.

It was caused by onPositionPopover, which was overriding align to undefined. This condition was always true: https://github.com/alexkatz/react-tiny-popover/blob/v7.1.0/src/Popover.tsx#L111

@alexkatz

alexkatz commented 1 year ago

Fix pushed to master along with some others, thank you for pointing this out!