revert the changes (#14119)

This commit is contained in:
Alan Ren
2021-01-29 16:42:29 -08:00
committed by GitHub
parent f6e39a7211
commit 15fa03876d

View File

@@ -86,9 +86,17 @@ export abstract class ComponentBase<TPropertyBag extends azdata.ComponentPropert
public refreshDataProvider(item: any): void {
}
public updateStyles(): void {
const element = (<HTMLElement>this._el.nativeElement);
for (const style in this.CSSStyles) {
element.style[style] = this.CSSStyles[style];
}
}
public setProperties(properties: { [key: string]: any; }): void {
properties = properties || {};
this.properties = properties;
this.updateStyles();
this.layout();
this.validate().catch(onUnexpectedError);
}
@@ -97,6 +105,7 @@ export abstract class ComponentBase<TPropertyBag extends azdata.ComponentPropert
public updateProperty(key: string, value: any): void {
if (key) {
this.properties[key] = value;
this.updateStyles();
this.layout();
this.validate().catch(onUnexpectedError);
}