mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-22 09:35:37 -05:00
Add more functionality to the grid (#7516)
This commit is contained in:
@@ -114,7 +114,7 @@ export class CellSelectionModel<T> implements Slick.SelectionModel<T, Array<Slic
|
||||
let columnIndex = this.grid.getColumnIndex(args.column.id!);
|
||||
if (this.grid.canCellBeSelected(0, columnIndex)) {
|
||||
let ranges: Array<Slick.Range>;
|
||||
if (e.shiftKey) {
|
||||
if (e.ctrlKey) {
|
||||
ranges = this.getSelectedRanges();
|
||||
ranges.push(new Slick.Range(0, columnIndex, this.grid.getDataLength() - 1, columnIndex));
|
||||
} else {
|
||||
@@ -230,9 +230,17 @@ export class CellSelectionModel<T> implements Slick.SelectionModel<T, Array<Slic
|
||||
let ranges: Array<Slick.Range>;
|
||||
|
||||
ranges = this.getSelectedRanges();
|
||||
ranges = this.insertIntoSelections(ranges, new Slick.Range(args.row, args.cell));
|
||||
|
||||
this.grid.setActiveCell(args.row, args.cell);
|
||||
let selectedRange: Slick.Range;
|
||||
if (args.cell === 0) {
|
||||
selectedRange = new Slick.Range(args.row, 1, args.row, args.grid.getColumns().length - 1);
|
||||
} else {
|
||||
selectedRange = new Slick.Range(args.row, args.cell);
|
||||
|
||||
}
|
||||
ranges = this.insertIntoSelections(ranges, selectedRange);
|
||||
|
||||
this.grid.setActiveCell(selectedRange.toRow, selectedRange.toCell);
|
||||
this.setSelectedRanges(ranges);
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
Reference in New Issue
Block a user