Skip to content
Snippets Groups Projects
Commit 9b7e6ddc authored by Benedikt Heinrichs's avatar Benedikt Heinrichs Committed by Petar Hristov
Browse files

Fix: Allow same file selection after removal from list

parent 20eb8207
No related branches found
No related tags found
3 merge requests!370merge dev into main,!369Chore 2.12.3,!367Fix: Allow same file selection after removal from list
......@@ -421,13 +421,26 @@ export default defineComponent({
lastModified: `${file.lastModified}`,
metadata: { [version]: factory.dataset() as unknown as Dataset },
};
this.fileListUpload.push(fileInformation);
// Prevent duplicates
if (
!this.fileListUpload.some(
(entry) => entry.path === fileInformation.path,
)
) {
this.fileListUpload.push(fileInformation);
}
}
// Clear selection in files view table
(
(this.$refs.filesView as Vue).$refs.adaptTable as BTable
).clearSelected();
// Clear form-file inputs
(this.$refs.fileTrigger as BFormFile).reset();
(this.$refs.folderTrigger as BFormFile).reset();
this.showDetail = false;
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment