Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Categories Charts
Created by Guest
Created on Dec 28, 2023

Being able to destroy an embedded chart or dashboard

The Charts Embedding SDK should expose some sort of destroy method to assist with cleaning up the DOM nodes created inside the divRef element. The workaround at the moment for this is to manually do this cleanup yourself inside the function returned by useLayoutEffect. A CodeSandbox example is https://codesandbox.io/s/blissful-resonance-5yjrpq?file=/src/App.tsx