I'm using react with glid-data-grid package, that package manipulate document for canvas view. What the best strategic to fix this issue ?
example page
---
import DashboardLayout from "../layouts/DashboardLayout.astro";
import Table from "./../components/Table.jsx";
---
<DashboardLayout>
<Table client:load />
</DashboardLayout>
some code from the lib
...
};
}
componentDidMount() {
document.addEventListener("mousedown", this.clickOutside, true);
document.addEventListener("contextmenu", this.clickOutside, true);
}
componentWillUnmount() {
document.removeEventListener("mousedown", this.clickOutside);
document.removeEventListener("contextmenu", this.clickOutside);
}
render() {
const { onClickOutside, ...rest } = this.props;
...