selected cell summary for status bar (#14358)

This commit is contained in:
Alan Ren
2021-02-19 11:29:04 -08:00
committed by GitHub
parent f528ffea9b
commit 83da03a728
7 changed files with 105 additions and 17 deletions

View File

@@ -62,6 +62,7 @@ export class QueryModelService implements IQueryModelService {
private _onRunQueryComplete: Emitter<string>;
private _onQueryEvent: Emitter<IQueryEvent>;
private _onEditSessionReady: Emitter<azdata.EditSessionReadyParams>;
private _onCellSelectionChangedEmitter = new Emitter<string[]>();
// EVENTS /////////////////////////////////////////////////////////////
public get onRunQueryStart(): Event<string> { return this._onRunQueryStart.event; }
@@ -69,6 +70,7 @@ export class QueryModelService implements IQueryModelService {
public get onRunQueryComplete(): Event<string> { return this._onRunQueryComplete.event; }
public get onQueryEvent(): Event<IQueryEvent> { return this._onQueryEvent.event; }
public get onEditSessionReady(): Event<azdata.EditSessionReadyParams> { return this._onEditSessionReady.event; }
public get onCellSelectionChanged(): Event<string[]> { return this._onCellSelectionChangedEmitter.event; }
// CONSTRUCTOR /////////////////////////////////////////////////////////
constructor(
@@ -96,6 +98,14 @@ export class QueryModelService implements IQueryModelService {
return dataService;
}
/**
* Notify the event subscribers about the new selected cell values
* @param selectedValues current selected cell values
*/
public notifyCellSelectionChanged(selectedValues: string[]): void {
this._onCellSelectionChangedEmitter.fire(selectedValues);
}
/**
* Force all grids to re-render. This is needed to re-render the grids when switching
* between different URIs.