Skip to content
Snippets Groups Projects
Commit 36a5217e authored by Petar Hristov's avatar Petar Hristov :speech_balloon:
Browse files

Merge branch 'Issue/2888-sameSelection' into 'dev'

Fix: Allow same file selection after removal from list

See merge request !367
parents fcceeb7f 9b7e6ddc
Branches
Tags
3 merge requests!370merge dev into main,!369Chore 2.12.3,!367Fix: Allow same file selection after removal from list
Pipeline #1337241 passed
...@@ -421,13 +421,26 @@ export default defineComponent({ ...@@ -421,13 +421,26 @@ export default defineComponent({
lastModified: `${file.lastModified}`, lastModified: `${file.lastModified}`,
metadata: { [version]: factory.dataset() as unknown as Dataset }, 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 // Clear selection in files view table
( (
(this.$refs.filesView as Vue).$refs.adaptTable as BTable (this.$refs.filesView as Vue).$refs.adaptTable as BTable
).clearSelected(); ).clearSelected();
// Clear form-file inputs
(this.$refs.fileTrigger as BFormFile).reset();
(this.$refs.folderTrigger as BFormFile).reset();
this.showDetail = false; this.showDetail = false;
}, },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment