Skip to content

Latest commit

 

History

History
45 lines (28 loc) · 1.47 KB

2021-06.md

File metadata and controls

45 lines (28 loc) · 1.47 KB

Mini #3: Measure-Command (equiv. of time in OSX\Linux)


Unix OSX

time npm list -g --depth=0


PowerShell

Measure-Command {npm list -g --depth=0 | Out-Default}

Mini #2: Calculated Field Formulas


Mini #1: Add all props in SPFx wp by default

In the base webpart (the one that extends BaseClientSideWebPart), change the line description: this.properties.description to be ...this.properties

Full code block after the change below

public render(): void {
  const element: React.ReactElement<ISampleWebPartProps> = React.createElement(
    SampleWebPart,
    {
      // description: this.properties.description
      ...this.properties,
    }
  );

  ReactDom.render(element, this.domElement);
}

Note that while all props under ISampleWebPartProps.ts will now be available via this.props, they will not show automatically under the property pane. One way to manage that is to only surface key properties using property controls and add Property Editor to access a full JSON of all properties as an advanced mode.