PnPjs Version 3 Sample

This commit is contained in:
Julie Turner 2022-02-22 19:57:47 +00:00
parent e7ac8f3a02
commit e63eaf76a5
4 changed files with 28493 additions and 39 deletions

View File

@ -3,7 +3,7 @@
"plusBeta": true,
"isCreatingSolution": true,
"environment": "spo",
"version": "1.14.0-beta.4",
"version": "1.14.0",
"libraryName": "spfx-pnp-js-example",
"libraryId": "d20ceaf6-094b-4086-b7a0-85761bc8be23",
"packageManager": "npm",

28449
samples/react-pnp-js-sample/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -14,8 +14,8 @@
"@microsoft/sp-office-ui-fabric-core": "1.14.0",
"@microsoft/sp-property-pane": "1.14.0",
"@microsoft/sp-webpart-base": "1.14.0",
"@pnp/logging": "^3.0.0",
"@pnp/sp": "^3.0.0",
"@pnp/logging": "^3.0.2",
"@pnp/sp": "^3.0.2",
"office-ui-fabric-react": "7.174.1",
"react": "16.13.1",
"react-dom": "16.13.1"

View File

@ -42,6 +42,7 @@ export default class PnPjsExample extends React.Component<IPnPjsExampleProps, II
}
public render(): React.ReactElement<IAsyncAwaitPnPJsProps> {
try {
// calculate total of file sizes
const totalDocs: number = this.state.items.length > 0
? this.state.items.reduce<number>((acc: number, item: IFile) => {
@ -76,6 +77,10 @@ export default class PnPjsExample extends React.Component<IPnPjsExampleProps, II
</table>
</div >
);
} catch (err) {
Logger.write(`${this.LOG_SOURCE} (render) - ${JSON.stringify(err)} - `, LogLevel.Error);
}
return null;
}
private _readAllFilesSize = async (): Promise<void> => {