mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-17 01:25:36 -05:00
Add focus function for modelview components (#8348)
* Add focus method for modelview components * Remove focus properties from table and radiobutton * Fix break
This commit is contained in:
@@ -711,6 +711,10 @@ class ComponentWrapper implements azdata.Component {
|
||||
public get valid(): boolean {
|
||||
return this._valid;
|
||||
}
|
||||
|
||||
public focus() {
|
||||
return this._proxy.$focus(this._handle, this._id);
|
||||
}
|
||||
}
|
||||
|
||||
class ComponentWithIconWrapper extends ComponentWrapper {
|
||||
@@ -1144,12 +1148,6 @@ class RadioButtonWrapper extends ComponentWrapper implements azdata.RadioButtonC
|
||||
public set checked(v: boolean) {
|
||||
this.setProperty('checked', v);
|
||||
}
|
||||
public get focused(): boolean {
|
||||
return this.properties['focused'];
|
||||
}
|
||||
public set focused(v: boolean) {
|
||||
this.setProperty('focused', v);
|
||||
}
|
||||
|
||||
public get onDidClick(): vscode.Event<any> {
|
||||
let emitter = this._emitterMap.get(ComponentEventType.onDidClick);
|
||||
@@ -1266,13 +1264,6 @@ class TableComponentWrapper extends ComponentWrapper implements azdata.TableComp
|
||||
this.setProperty('moveFocusOutWithTab', v);
|
||||
}
|
||||
|
||||
public get focused(): boolean {
|
||||
return this.properties['focused'];
|
||||
}
|
||||
public set focused(v: boolean) {
|
||||
this.setProperty('focused', v);
|
||||
}
|
||||
|
||||
public get updateCells(): azdata.TableCell[] {
|
||||
return this.properties['updateCells'];
|
||||
}
|
||||
|
||||
@@ -736,6 +736,7 @@ export interface MainThreadModelViewShape extends IDisposable {
|
||||
$validate(handle: number, componentId: string): Thenable<boolean>;
|
||||
$setDataProvider(handle: number, componentId: string): Thenable<void>;
|
||||
$refreshDataProvider(handle: number, componentId: string, item?: any): Thenable<void>;
|
||||
$focus(handle: number, componentId: string): Thenable<void>;
|
||||
}
|
||||
|
||||
export interface ExtHostObjectExplorerShape {
|
||||
|
||||
Reference in New Issue
Block a user