-
-
Notifications
You must be signed in to change notification settings - Fork 46
Description
Hi,
I've encountered an issue where a function within the library continues to be called even after the parent component unmounts. This appears to be related to improper cleanup of event listeners, callbacks, or subscriptions when the component is removed from the DOM.
Specifically, I'm receiving the following error: "Failed to execute 'showPopover' on 'HTMLElement': Invalid on disconnected popover elements. InvalidStateError: Failed to execute 'showPopover' on 'HTMLElement': Invalid on disconnected popover elements."
Could you please help clarify the following:
• Why might the function be invoked after the component has been unmounted?
• Does the library offer any built-in cleanup functions (e.g., detach, cancel, or similar methods) to deregister event listeners or callbacks when the component is unmounted?
• Are there any recommended best practices or additional steps we should take to prevent this issue when using the library?
Any insights you can provide would be greatly appreciated, as they will help us effectively troubleshoot and resolve this behavior.
Thank you for your assistance.