Skip to content

Commit 3e8b740

Browse files
refactor: update FileEntryCheckbox to use nodeId consistently
- Replace fileId variable with nodeId in selection filter logic - Update selection logic to use source.nodeId instead of source.id - Remove debug log statement for shift key selection - Ensure consistency with store API Signed-off-by: Vitor Mattos <[email protected]>
1 parent 40ac531 commit 3e8b740

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

src/views/FilesList/FileEntry/FileEntryCheckbox.vue

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,17 +88,15 @@ export default {
8888
8989
// If already selected, update the new selection _without_ the current file
9090
const selection = [...new Set([...lastSelection, ...filesToSelect])]
91-
.filter(fileId => !isAlreadySelected || fileId !== this.source.id)
92-
93-
logger.debug('Shift key pressed, selecting all files in between', { start, end, filesToSelect, isAlreadySelected })
91+
.filter(nodeId => !isAlreadySelected || nodeId !== this.source.nodeId)
9492
// Keep previous lastSelectedIndex to be use for further shift selections
9593
this.selectionStore.set(selection)
9694
return
9795
}
9896
9997
const selection = selected
100-
? [...this.selectedFiles, this.source.id]
101-
: this.selectedFiles.filter(fileId => fileId !== this.source.id)
98+
? [...this.selectedFiles, this.source.nodeId]
99+
: this.selectedFiles.filter(nodeId => nodeId !== this.source.nodeId)
102100
103101
logger.debug('Updating selection', { selection })
104102
this.selectionStore.set(selection)

0 commit comments

Comments
 (0)