mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 17:22:45 -05:00
Add required property to checkbox and set it for deployment dialog (#9392)
This commit is contained in:
@@ -90,6 +90,9 @@ export default class CheckBoxComponent extends ComponentBase implements ICompone
|
||||
if (this.ariaLabel) {
|
||||
this._input.ariaLabel = this.ariaLabel;
|
||||
}
|
||||
if (this.required) {
|
||||
this._input.required = this.required;
|
||||
}
|
||||
}
|
||||
|
||||
// CSS-bound properties
|
||||
@@ -110,6 +113,14 @@ export default class CheckBoxComponent extends ComponentBase implements ICompone
|
||||
this.setPropertyFromUI<azdata.CheckBoxProperties, string>((properties, label) => { properties.label = label; }, newValue);
|
||||
}
|
||||
|
||||
public get required(): boolean {
|
||||
return this.getPropertyOrDefault<azdata.CheckBoxProperties, boolean>((props) => props.required, false);
|
||||
}
|
||||
|
||||
public set required(newValue: boolean) {
|
||||
this.setPropertyFromUI<azdata.CheckBoxProperties, boolean>((props, value) => props.required = value, newValue);
|
||||
}
|
||||
|
||||
public focus(): void {
|
||||
this._input.focus();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user