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