remove update style (#13886)

* remove update style

* sample composite button
This commit is contained in:
Alan Ren
2021-01-05 13:28:31 -08:00
committed by GitHub
parent bc9719d5a8
commit ab6d11596e
2 changed files with 44 additions and 9 deletions

View File

@@ -86,17 +86,9 @@ 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);
}
@@ -105,7 +97,6 @@ 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);
}