Skip to content
Snippets Groups Projects
Commit 3747cd2c authored by Jacopo Gasparetto's avatar Jacopo Gasparetto
Browse files

fix(frontend): deselection not working when a folder is selected

parent 3968e74e
No related branches found
Tags v0.8.0-dev.2
1 merge request!21feat(release): New release
Checking pipeline status
......@@ -168,11 +168,20 @@ export const BucketBrowser = ({ bucketName }: PropsType) => {
throw new Error("Object name is undefined");
}
if (selectedRows.has(index)) {
const newState = new Set(selectedRows);
newState.delete(index);
selectedObjects.current = new Map(
Object.entries(selectedObjects.current)
.filter(([key]) => key.startsWith(objectName)));
setSelectedRows(newState);
return;
}
const next = currentPath.findChild(objectName);
if (!next) {
throw new Error(`Child with name ${objectName} not found.`);
}
const isDir = next.children.length > 0;
if (isDir) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment