ElemeFE / ElemeFE/element-react
Memory Leak With Popover Component
- Dominant language
- JavaScript
- Stars
- 2.8k
- Forks
- 435
- PR merge metrics
- No merged PRs in 30d
Description
### Description
On popover unmount, the state is being changed resulting in a memory leak warning.
### Reproduce Steps
We ran into it when the unmount lifecycle event fires, while simultaneously clicking a button (example: clicking a cancel button).
### Error Trace (if possible)

### Solution
Fix: there is a click event attached to the document that closes the popover if clicking outside of the popover. This logic needs to be handled differently.
### Additional Information
Like I said earlier: This occurs when clicking anywhere on the document while the popover component is/did unmount.
Contributor guide
Assessment
This issue has not been assessed yet.