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:
@@ -75,7 +75,6 @@ export default class RadioButtonComponent extends ComponentBase implements IComp
|
||||
this._input.label = this.label;
|
||||
this._input.enabled = this.enabled;
|
||||
this._input.checked = this.checked;
|
||||
this.focused ? this._input.focus() : this._input.blur();
|
||||
}
|
||||
|
||||
// CSS-bound properties
|
||||
@@ -116,11 +115,8 @@ export default class RadioButtonComponent extends ComponentBase implements IComp
|
||||
this.setPropertyFromUI<azdata.RadioButtonProperties, string>((properties, label) => { properties.name = label; }, newValue);
|
||||
}
|
||||
|
||||
public get focused(): boolean {
|
||||
return this.getPropertyOrDefault<azdata.RadioButtonProperties, boolean>((props) => props.focused, false);
|
||||
public focus(): void {
|
||||
this._input.focus();
|
||||
}
|
||||
|
||||
public set focused(newValue: boolean) {
|
||||
this.setPropertyFromUI<azdata.RadioButtonProperties, boolean>((properties, value) => { properties.focused = value; }, newValue);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user