diff --git a/src/plugins/telemetryTable/components/table.vue b/src/plugins/telemetryTable/components/table.vue index 3617e3b296..0e5716d547 100644 --- a/src/plugins/telemetryTable/components/table.vue +++ b/src/plugins/telemetryTable/components/table.vue @@ -733,9 +733,21 @@ export default { this.markedRows.forEach(r => r.marked = false); this.markedRows = []; }, - unmarkRow(rowIndex) { - this.undoMarkedRows(); - this.unpause(); + unmarkRow(rowIndex, ctrlKeyModifier) { + if (ctrlKeyModifier) { + let row = this.visibleRows[rowIndex], + positionInMarkedArray = this.markedRows.indexOf(row); + + row.marked = false; + this.markedRows.splice(positionInMarkedArray, 1); + + if (this.markedRows.length === 0) { + this.unpause(); + } + } else if (this.markedRows.length) { + this.undoMarkedRows(); + this.markRow(rowIndex); + } }, markRow(rowIndex, keyModifier) { if (!this.enableMarking) { @@ -785,16 +797,18 @@ export default { //supports backward selection if (lastRowIndex < firstRowIndex) { - let temp = lastRowIndex; - - lastRowIndex = firstRowIndex; - firstRowIndex = temp - 1; + [firstRowIndex, lastRowIndex] = [lastRowIndex, firstRowIndex]; } + + let baseRow = this.markedRows[0]; - for (var i = firstRowIndex + 1; i <= lastRowIndex; i++) { + for (var i = firstRowIndex; i <= lastRowIndex; i++) { let row = allRows[i]; row.marked = true; - this.markedRows.push(row); + + if (row !== baseRow){ + this.markedRows.push(row); + } } } }