mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-19 09:35:36 -05:00
Add readOnly property to InputBoxComponent (#10687)
This commit is contained in:
@@ -244,6 +244,7 @@ export default class InputBoxComponent extends ComponentBase implements ICompone
|
||||
}
|
||||
|
||||
input.inputElement.required = this.required;
|
||||
input.inputElement.readOnly = this.readOnly;
|
||||
}
|
||||
|
||||
// CSS-bound properties
|
||||
@@ -316,6 +317,14 @@ export default class InputBoxComponent extends ComponentBase implements ICompone
|
||||
this.setPropertyFromUI<azdata.InputBoxProperties, boolean>((props, value) => props.multiline = value, newValue);
|
||||
}
|
||||
|
||||
public get readOnly(): boolean {
|
||||
return this.getPropertyOrDefault<azdata.InputBoxProperties, boolean>((props) => props.readOnly, false);
|
||||
}
|
||||
|
||||
public set readOnly(newValue: boolean) {
|
||||
this.setPropertyFromUI<azdata.InputBoxProperties, boolean>((props, value) => props.readOnly = value, newValue);
|
||||
}
|
||||
|
||||
public get required(): boolean {
|
||||
return this.getPropertyOrDefault<azdata.InputBoxProperties, boolean>((props) => props.required, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user