resolve lint warnings
This commit is contained in:
parent
eeb1998d86
commit
0206a69f61
|
@ -21,7 +21,7 @@ export interface ITwitterFeedWebPartProps extends ITwittweTimelineSettings {
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class TwitterFeedWebPart extends BaseClientSideWebPart<ITwitterFeedWebPartProps> {
|
export default class TwitterFeedWebPart extends BaseClientSideWebPart<ITwitterFeedWebPartProps> {
|
||||||
|
private _rootElement: HTMLElement;
|
||||||
public onInit(): Promise<void> {
|
public onInit(): Promise<void> {
|
||||||
if (!this.properties.sourceType) {
|
if (!this.properties.sourceType) {
|
||||||
this.properties.sourceType = 'profile';
|
this.properties.sourceType = 'profile';
|
||||||
|
@ -47,20 +47,24 @@ export default class TwitterFeedWebPart extends BaseClientSideWebPart<ITwitterFe
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
if (!this._rootElement) {
|
||||||
|
this._rootElement = document.createElement("div");
|
||||||
|
this.domElement.appendChild(this._rootElement);
|
||||||
|
}
|
||||||
|
|
||||||
ReactDom.unmountComponentAtNode(this.domElement);
|
ReactDom.render(element, this._rootElement);
|
||||||
ReactDom.render(element, this.domElement);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected onDispose(): void {
|
protected onDispose(): void {
|
||||||
ReactDom.unmountComponentAtNode(this.domElement);
|
ReactDom.unmountComponentAtNode(this._rootElement);
|
||||||
|
this._rootElement.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected get dataVersion(): Version {
|
protected get dataVersion(): Version {
|
||||||
return Version.parse('1.0');
|
return Version.parse('1.0');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected onBeforeSerialize() {
|
protected onBeforeSerialize():void {
|
||||||
const {
|
const {
|
||||||
sourceType,
|
sourceType,
|
||||||
autoHeight,
|
autoHeight,
|
||||||
|
@ -112,7 +116,7 @@ export default class TwitterFeedWebPart extends BaseClientSideWebPart<ITwitterFe
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected onPropertyPaneFieldChanged(propertyPath: string, oldValue: any, newValue: any) {
|
protected onPropertyPaneFieldChanged(propertyPath: string, oldValue: number, newValue: number):void {
|
||||||
const value = newValue as number;
|
const value = newValue as number;
|
||||||
if (propertyPath === 'tweetLimit') {
|
if (propertyPath === 'tweetLimit') {
|
||||||
if (value === 0) {
|
if (value === 0) {
|
||||||
|
|
Loading…
Reference in New Issue