It might be some edge case but having multiple tooltips on a page that react on hover event with at least one of them with conditional render breaks proper functioning of all tooltips. The problem is believed to be in useUnmount hook in Portal component on line 66 where the number of rendered tooltips on one page isn't taken into account.
Expected behavior
When there are several tooltips on a page, unmounting of one of them don't break functioning of others
🐛 Bug Report
It might be some edge case but having multiple tooltips on a page that react on hover event with at least one of them with conditional render breaks proper functioning of all tooltips. The problem is believed to be in
useUnmount
hook inPortal
component on line 66 where the number of rendered tooltips on one page isn't taken into account.Expected behavior
When there are several tooltips on a page, unmounting of one of them don't break functioning of others
Link to repl or repo
https://codesandbox.io/s/fervent-kapitsa-0lp53r?file=/src/index.tsx At first everything work OK but after clicking on "Unmet Condition" button tooltips are not shown at all. While second click on that button returns functioning of unmounted tooltip but not others
Run
npx envinfo --system --binaries --npmPackages react-floater
Paste the results here: