X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/095e176632bbf81d28a239742a1ecce12404bd2d..62d3fea589acf744bb8ead4d42e11f794633704c:/services/workbench2/src/components/data-table-filters/data-table-filters-popover.tsx?ds=sidebyside

diff --git a/services/workbench2/src/components/data-table-filters/data-table-filters-popover.tsx b/services/workbench2/src/components/data-table-filters/data-table-filters-popover.tsx
index 557abd825a..a5ac7421c0 100644
--- a/services/workbench2/src/components/data-table-filters/data-table-filters-popover.tsx
+++ b/services/workbench2/src/components/data-table-filters/data-table-filters-popover.tsx
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import React, { useEffect } from 'react';
+import React from 'react';
 import {
     WithStyles,
     withStyles,
@@ -101,6 +101,10 @@ export const DataTableFiltersPopover = withStyles(styles)(
         };
         icon = React.createRef<HTMLElement>();
 
+        componentWillUnmount(): void {
+            this.submit.cancel();
+        }
+
         render() {
             const { name, classes, defaultSelection = SelectionMode.ALL, children } = this.props;
             const isActive = getNodeDescendants('')(this.state.filters).some((f) => (defaultSelection === SelectionMode.ALL ? !f.selected : f.selected));
@@ -137,7 +141,6 @@ export const DataTableFiltersPopover = withStyles(styles)(
                             </>
                         </Card>
                     </Popover>
-                    <this.MountHandler />
                 </>
             );
         }
@@ -172,15 +175,6 @@ export const DataTableFiltersPopover = withStyles(styles)(
             }
         }, 1000);
 
-        MountHandler = () => {
-            useEffect(() => {
-                return () => {
-                    this.submit.cancel();
-                };
-            }, []);
-            return null;
-        };
-
         close = () => {
             this.setState((prev) => ({
                 ...prev,
