mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-15 01:25:36 -05:00
Change tables to make them work for our scenario (#12193)
* Change tables to make them work for our scenario * Comments & deprecate API * Disable selections by default
This commit is contained in:
@@ -1462,15 +1462,26 @@ class DeclarativeTableWrapper extends ComponentWrapper implements azdata.Declara
|
||||
super(proxy, handle, ModelComponentTypes.DeclarativeTable, id);
|
||||
this.properties = {};
|
||||
this._emitterMap.set(ComponentEventType.onDidChange, new Emitter<any>());
|
||||
this._emitterMap.set(ComponentEventType.onDidClick, new Emitter<any>());
|
||||
|
||||
}
|
||||
|
||||
public get data(): any[][] {
|
||||
return this.properties['data'];
|
||||
}
|
||||
|
||||
public set data(v: any[][]) {
|
||||
this.setProperty('data', v);
|
||||
}
|
||||
|
||||
public get dataValues(): azdata.DeclarativeTableCellValue[][] {
|
||||
return this.properties['dataValues'];
|
||||
}
|
||||
|
||||
public set dataValues(v: azdata.DeclarativeTableCellValue[][]) {
|
||||
this.setProperty('dataValues', v);
|
||||
}
|
||||
|
||||
public get columns(): azdata.DeclarativeTableColumn[] {
|
||||
return this.properties['columns'];
|
||||
}
|
||||
@@ -1484,10 +1495,23 @@ class DeclarativeTableWrapper extends ComponentWrapper implements azdata.Declara
|
||||
return emitter && emitter.event;
|
||||
}
|
||||
|
||||
public get onRowSelected(): vscode.Event<any> {
|
||||
let emitter = this._emitterMap.get(ComponentEventType.onDidClick);
|
||||
return emitter && emitter.event;
|
||||
}
|
||||
|
||||
protected notifyPropertyChanged(): Thenable<void> {
|
||||
return this._proxy.$setProperties(this._handle, this._id, this.getPropertiesForMainThread());
|
||||
}
|
||||
|
||||
public get selectEffect(): boolean | undefined {
|
||||
return this.properties['selectEffect'];
|
||||
}
|
||||
|
||||
public set selectEffect(v: boolean | undefined) {
|
||||
this.setProperty('selectEffect', v);
|
||||
}
|
||||
|
||||
public toComponentShape(): IComponentShape {
|
||||
// Overridden to ensure we send the correct properties mapping.
|
||||
return <IComponentShape>{
|
||||
|
||||
Reference in New Issue
Block a user