precise-ui
precise-ui copied to clipboard
OverflowMenu onBlur causes unmounted state update
Bug Report
Prerequisites
- [x] Can you reproduce the problem in a MWE?
- [x] Are you running the latest version?
- [x] Did you check the FAQs to see if that helps you?
- [x] Are you reporting to the correct repository?
- [x] Did you perform a search in the issues?
For more information, see the CONTRIBUTING guide.
Versions
precise-ui: 1.2.0
node: 12.13.1
npm: 6.12.1
Description
Double clicking the trigger icon of the menu throws:
Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
See also attachment at the end.
Steps to Reproduce
- npm start
- Go to
OverflowMenucomponent - Click on the icon one time
- Click on the icon again
- Error will come up
Expected behavior: No error Environment details: macOS 10.15.4, all browsers
Possible Solution
Removing onBlur will resolve it. Is it needed? Outside click and list selection will also close it.
