mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-19 01:25:36 -05:00
selected cell summary for status bar (#14358)
This commit is contained in:
@@ -48,6 +48,9 @@ export interface IQueryEvent {
|
||||
export interface IQueryModelService {
|
||||
_serviceBrand: undefined;
|
||||
|
||||
onCellSelectionChanged: Event<string[]>;
|
||||
notifyCellSelectionChanged(selectedValues: string[]): void;
|
||||
|
||||
getQueryRunner(uri: string): QueryRunner | undefined;
|
||||
|
||||
getQueryRows(uri: string, rowStart: number, numberOfRows: number, batchId: number, resultId: number): Promise<ResultSetSubset | undefined>;
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user