ktmud commented on code in PR #21438:
URL: https://github.com/apache/superset/pull/21438#discussion_r974800103
##########
superset-frontend/src/dashboard/components/gridComponents/Row.jsx:
##########
@@ -69,6 +81,37 @@ class Row extends React.PureComponent {
'background',
);
this.handleChangeFocus = this.handleChangeFocus.bind(this);
+
+ this.containerRef = React.createRef();
+ this.observer = null;
+ }
+
+ componentDidMount() {
+ if (
+ isDashboardVirtualizationEnabled(this.props.dashboardVirtualizationMode)
+ ) {
+ this.observer = new IntersectionObserver(
Review Comment:
Should we
[disconnect](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/disconnect)
and
[unobserve](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/unobserve)
on unmount? Just to reduce the chance of memory leak.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]