21128: checkboxes dont preserve through URL changes anymore Arvados-DCO-1.1-Signed...
[arvados-workbench2.git] / src / components / data-table / data-table.tsx
index 155d772f85855ddd86a90ecc7842065d543e830f..84d377bba13fb74ab89701a259f3615bf08d127b 100644 (file)
@@ -155,6 +155,13 @@ export const DataTable = withStyles(styles)(
                 if (items.length) this.initializeCheckedList(items);
                 else setCheckedListOnStore({});
             }
+            if (prevProps.currentRoute !== this.props.currentRoute) {
+                this.initializeCheckedList([])
+            }
+        }
+
+        componentWillUnmount(): void {
+            this.initializeCheckedList([])
         }
 
         checkBoxColumn: DataColumn<any, any> = {