react-popper
react-popper copied to clipboard
fix: Returns correct state when referenceElement becomes null
When I change referenceElement or popperElement to null, usePopper returns old state to me.
Steps To Reproduce
- open the reproduce link: https://codepen.io/lmk123/pen/zYrRzMM
- click the 'Set referenceElement to null' button
Expected behavior: state.placement becomes null
Current behavior: state.placement is still bottom