mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-19 09:35:36 -05:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user