Update active grid tracking to fix copy bug (#2162)

This commit is contained in:
Karl Burtram
2018-08-07 13:57:24 -04:00
committed by GitHub
parent 36fc1bb71a
commit fba8536c33
2 changed files with 8 additions and 0 deletions

View File

@@ -22,6 +22,7 @@
enableAsyncPostRender="true"
showHeader="true"
[resized]="dataSet.resized"
(onActiveCellChanged)="onActiveCellChanged(i)"
(mousedown)="navigateToGrid(i)"
[selectionModel]="selectionModel"
[plugins]="plugins[i]"

View File

@@ -160,6 +160,7 @@ export class QueryComponent extends GridParentComponent implements OnInit, OnDes
public queryPlanAvailable: EventEmitter<string> = new EventEmitter<string>();
public showChartRequested: EventEmitter<IGridDataSet> = new EventEmitter<IGridDataSet>();
public goToNextQueryOutputTabRequested: EventEmitter<void> = new EventEmitter<void>();
public onActiveCellChanged: (gridIndex: number) => void;
private savedViewState: {
gridSelections: ISlickRange[][];
@@ -266,6 +267,8 @@ export class QueryComponent extends GridParentComponent implements OnInit, OnDes
self.complete = false;
self.activeGrid = 0;
this.onActiveCellChanged = this.onCellSelect;
// reset query plan info and send notification to subscribers
self.hasQueryPlan = false;
self.sentPlans = new Map<number, string>();
@@ -402,6 +405,10 @@ export class QueryComponent extends GridParentComponent implements OnInit, OnDes
self.onScroll(0);
}
onCellSelect(gridIndex: number): void {
this.activeGrid = gridIndex;
}
openMessagesContextMenu(event: any): void {
let self = this;
event.preventDefault();