This commit is contained in:
Mikael Svenson 2020-03-16 16:54:04 +01:00
parent b9c7977eff
commit 90e1658e18
3 changed files with 1 additions and 11 deletions

View File

@ -16,15 +16,9 @@ export default class ScriptEditorWebPart extends BaseClientSideWebPart<IScriptEd
this.scriptUpdate = this.scriptUpdate.bind(this);
}
public scriptUpdate(_property: string, oldVal: string, newVal: string) {
public scriptUpdate(_property: string, _oldVal: string, newVal: string) {
this.properties.script = newVal;
this._propertyPaneHelper.initialValue = newVal;
// this.render();
}
public save: (script: string) => void = (script: string) => {
this.properties.script = script;
this.render();
}
public render(): void {
@ -65,7 +59,6 @@ export default class ScriptEditorWebPart extends BaseClientSideWebPart<IScriptEd
script: this.properties.script,
title: this.properties.title,
propPaneHandle: this.context.propertyPane,
save: this.save,
key: "pnp" + new Date().getTime()
}
);

View File

@ -3,5 +3,4 @@ export interface IScriptEditorProps {
script: string;
title: string;
propPaneHandle: IPropertyPaneAccessor;
save(script: string): void;
}

View File

@ -1,8 +1,6 @@
import * as React from 'react';
import { IScriptEditorProps } from './IScriptEditorProps';
import { Placeholder } from "@pnp/spfx-controls-react/lib/Placeholder";
// const telemetry = PnPTelemetry.getInstance();
// telemetry.optOut();
export default class ScriptEditor extends React.Component<IScriptEditorProps, any> {
constructor(props: IScriptEditorProps, state: any) {