mirror of
https://github.com/pnp/sp-dev-fx-webparts.git
synced 2025-03-09 06:38:52 +00:00
Cleanup
This commit is contained in:
parent
b9c7977eff
commit
90e1658e18
@ -16,15 +16,9 @@ export default class ScriptEditorWebPart extends BaseClientSideWebPart<IScriptEd
|
|||||||
this.scriptUpdate = this.scriptUpdate.bind(this);
|
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.properties.script = newVal;
|
||||||
this._propertyPaneHelper.initialValue = newVal;
|
this._propertyPaneHelper.initialValue = newVal;
|
||||||
// this.render();
|
|
||||||
}
|
|
||||||
|
|
||||||
public save: (script: string) => void = (script: string) => {
|
|
||||||
this.properties.script = script;
|
|
||||||
this.render();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public render(): void {
|
public render(): void {
|
||||||
@ -65,7 +59,6 @@ export default class ScriptEditorWebPart extends BaseClientSideWebPart<IScriptEd
|
|||||||
script: this.properties.script,
|
script: this.properties.script,
|
||||||
title: this.properties.title,
|
title: this.properties.title,
|
||||||
propPaneHandle: this.context.propertyPane,
|
propPaneHandle: this.context.propertyPane,
|
||||||
save: this.save,
|
|
||||||
key: "pnp" + new Date().getTime()
|
key: "pnp" + new Date().getTime()
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -3,5 +3,4 @@ export interface IScriptEditorProps {
|
|||||||
script: string;
|
script: string;
|
||||||
title: string;
|
title: string;
|
||||||
propPaneHandle: IPropertyPaneAccessor;
|
propPaneHandle: IPropertyPaneAccessor;
|
||||||
save(script: string): void;
|
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { IScriptEditorProps } from './IScriptEditorProps';
|
import { IScriptEditorProps } from './IScriptEditorProps';
|
||||||
import { Placeholder } from "@pnp/spfx-controls-react/lib/Placeholder";
|
import { Placeholder } from "@pnp/spfx-controls-react/lib/Placeholder";
|
||||||
// const telemetry = PnPTelemetry.getInstance();
|
|
||||||
// telemetry.optOut();
|
|
||||||
|
|
||||||
export default class ScriptEditor extends React.Component<IScriptEditorProps, any> {
|
export default class ScriptEditor extends React.Component<IScriptEditorProps, any> {
|
||||||
constructor(props: IScriptEditorProps, state: any) {
|
constructor(props: IScriptEditorProps, state: any) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user