Expose inputbox title so hover text can be set (#13084)

* expose inputbox title so hover text can be set

* only update title if there's a value
This commit is contained in:
Kim Santiago
2020-10-26 16:30:53 -07:00
committed by GitHub
parent c2bd11fa9e
commit 1e3c9b722e
2 changed files with 17 additions and 0 deletions

View File

@@ -245,6 +245,11 @@ export default class InputBoxComponent extends ComponentBase<azdata.InputBoxProp
input.inputElement.required = this.required;
input.inputElement.readOnly = this.readOnly;
// only update title if there's a value, otherwise title gets set to placeholder above
if (this.title) {
input.inputElement.title = this.title;
}
}
// CSS-bound properties
@@ -269,6 +274,14 @@ export default class InputBoxComponent extends ComponentBase<azdata.InputBoxProp
this.setPropertyFromUI<string>((props, value) => props.placeHolder = value, newValue);
}
public get title(): string {
return this.getPropertyOrDefault<string>((props) => props.title, '');
}
public set title(newValue: string) {
this.setPropertyFromUI<string>((props, value) => props.title = value, newValue);
}
public set columns(newValue: number) {
this.setPropertyFromUI<number>((props, value) => props.columns = value, newValue);
}