mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-16 09:35:36 -05:00
fix the grid goes blank issue (#20209)
This commit is contained in:
@@ -127,7 +127,7 @@ export class CellSelectionModel<T> implements Slick.SelectionModel<T, Array<Slic
|
||||
} else {
|
||||
ranges = [new Slick.Range(0, columnIndex, this.grid.getDataLength() - 1, columnIndex)];
|
||||
}
|
||||
this.grid.setActiveCell(0, columnIndex);
|
||||
this.grid.setActiveCell(this.grid.getViewport()?.top ?? 0, columnIndex);
|
||||
this.setSelectedRanges(ranges);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ export class RowNumberColumn<T> implements Slick.Plugin<T> {
|
||||
|
||||
private handleHeaderClick(e: MouseEvent, args: Slick.OnHeaderClickEventArgs<T>): void {
|
||||
if (args.column.id === 'rowNumber') {
|
||||
this.grid.setActiveCell(0, 1);
|
||||
this.grid.setActiveCell(this.grid.getViewport()?.top ?? 0, 1);
|
||||
let selectionModel = this.grid.getSelectionModel();
|
||||
if (selectionModel) {
|
||||
selectionModel.setSelectedRanges([new Slick.Range(0, 0, this.grid.getDataLength() - 1, this.grid.getColumns().length - 1)]);
|
||||
|
||||
Reference in New Issue
Block a user