mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 09:35:39 -05:00
fix the grid goes blank issue (#20209)
This commit is contained in:
@@ -358,7 +358,6 @@ export abstract class GridTableBase<T> extends Disposable implements IView {
|
||||
|
||||
private _state: GridTableState;
|
||||
|
||||
private scrolled = false;
|
||||
private visible = false;
|
||||
|
||||
private rowHeight: number;
|
||||
@@ -450,8 +449,6 @@ export abstract class GridTableBase<T> extends Disposable implements IView {
|
||||
);
|
||||
this.dataProvider.dataRows = collection;
|
||||
this.table.updateRowCount();
|
||||
// when we are removed slickgrid acts badly so we need to account for that
|
||||
this.scrolled = false;
|
||||
}
|
||||
|
||||
// actionsOrientation controls the orientation (horizontal or vertical) of the actionBar
|
||||
@@ -520,8 +517,6 @@ export abstract class GridTableBase<T> extends Disposable implements IView {
|
||||
this._register(this.dataProvider.onFilterStateChange(() => { this.layout(); }));
|
||||
this._register(this.table.onContextMenu(this.contextMenu, this));
|
||||
this._register(this.table.onClick(this.onTableClick, this));
|
||||
//This listener is used for correcting auto-scroling when clicking on the header for reszing.
|
||||
this._register(this.table.onHeaderClick(this.onHeaderClick, this));
|
||||
this._register(this.dataProvider.onFilterStateChange(() => {
|
||||
const columns = this.table.columns as FilterableColumn<T>[];
|
||||
this.state.columnFilters = columns.filter((column) => column.filterValues?.length > 0).map(column => {
|
||||
@@ -582,10 +577,6 @@ export abstract class GridTableBase<T> extends Disposable implements IView {
|
||||
// so ignore those events
|
||||
return;
|
||||
}
|
||||
if (!this.scrolled && (this.state.scrollPositionY || this.state.scrollPositionX) && isInDOM(this.container)) {
|
||||
this.scrolled = true;
|
||||
this.restoreScrollState();
|
||||
}
|
||||
if (this.state && isInDOM(this.container)) {
|
||||
this.state.scrollPositionY = data.scrollTop;
|
||||
this.state.scrollPositionX = data.scrollLeft;
|
||||
@@ -664,11 +655,6 @@ export abstract class GridTableBase<T> extends Disposable implements IView {
|
||||
this._state = val;
|
||||
}
|
||||
|
||||
private onHeaderClick(event: ITableMouseEvent) {
|
||||
//header clicks must be accounted for as they force the table to scroll to the top;
|
||||
this.scrolled = false;
|
||||
}
|
||||
|
||||
private async getRowData(start: number, length: number): Promise<ICellValue[][]> {
|
||||
let subset;
|
||||
if (this.dataProvider.isDataInMemory) {
|
||||
|
||||
Reference in New Issue
Block a user