X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/bd9d5de7661670a0e812f70555f33ce7da7be799..78d24df44eb539334c623cc5ccffc6a1554c3c33:/services/workbench2/src/components/data-table/data-table.tsx diff --git a/services/workbench2/src/components/data-table/data-table.tsx b/services/workbench2/src/components/data-table/data-table.tsx index d3bbab5077..9c1641dc87 100644 --- a/services/workbench2/src/components/data-table/data-table.tsx +++ b/services/workbench2/src/components/data-table/data-table.tsx @@ -216,11 +216,12 @@ export const DataTable = withStyles(styles)( initializeCheckedList = (uuids: any[]): void => { const newCheckedList = { ...this.props.checkedList }; - uuids.forEach(uuid => { - if (!newCheckedList.hasOwnProperty(uuid)) { - newCheckedList[uuid] = false; + if(Object.keys(newCheckedList).length === 0){ + for(const uuid of uuids){ + newCheckedList[uuid] = false } - }); + } + for (const key in newCheckedList) { if (!uuids.includes(key)) { delete newCheckedList[key];