sp-dev-fx-webparts/samples/sharepoint-crud
Shreyas Ganta d159945fd5
Updated packages and removed duplicate tslint.json which were causing build errors (#1157)
* bug fix: The change in document library selection was not reflected in the FileUpload component. This has been fixed by making sure the eventhandlers on dropzone component used the parent FileUpload component property for listname

* Removed the older duplicate tslint.json file from the config file as it was causing build to fail. This issue is documented in the github issue: https://github.com/SharePoint/sp-dev-fx-webparts/issues/739

* Updated the npm package event-stream since the version 3.3.6 was not available in npm registry, updated node-sass to remove build error and removed the duplicate tslint.json which was causing build error.
2020-03-09 20:19:41 +02:00
..
assets Added SharePoint CRUD sample (#16) 2016-09-16 06:33:47 +02:00
config Updated packages and removed duplicate tslint.json which were causing build errors (#1157) 2020-03-09 20:19:41 +02:00
src SharePoint CRUD sample updated to SPFx 1.6.0 (#666) 2018-11-09 09:44:42 +02:00
.editorconfig Added SharePoint CRUD sample (#16) 2016-09-16 06:33:47 +02:00
.gitattributes Added SharePoint CRUD sample (#16) 2016-09-16 06:33:47 +02:00
.gitignore Updated SharePoint CRUD sample to SPFx GA (#147) 2017-03-09 15:03:19 +02:00
.npmignore Updated SharePoint CRUD sample to SPFx GA (#147) 2017-03-09 15:03:19 +02:00
.yo-rc.json SharePoint CRUD sample updated to SPFx 1.6.0 (#666) 2018-11-09 09:44:42 +02:00
README.md Updated sample YAML description 2020-02-14 15:28:15 -08:00
gulpfile.js SharePoint CRUD sample updated to SPFx 1.4.1 (#464) 2018-04-04 16:53:25 +02:00
package-lock.json Updated packages and removed duplicate tslint.json which were causing build errors (#1157) 2020-03-09 20:19:41 +02:00
package.json Updated packages and removed duplicate tslint.json which were causing build errors (#1157) 2020-03-09 20:19:41 +02:00
tsconfig.json SharePoint CRUD sample updated to SPFx 1.6.0 (#666) 2018-11-09 09:44:42 +02:00
tslint.json SharePoint CRUD sample updated to SPFx 1.6.0 (#666) 2018-11-09 09:44:42 +02:00

README.md

page_type products languages extensions
sample
office-sp
javascript
typescript
contentType technologies platforms createdDate
samples
SharePoint Framework
JQuery
Knockout
React
1/1/2016 12:00:00 AM

SharePoint CRUD operations

Summary

Sample Web Parts illustrating performing SharePoint CRUD operations in React, Angular, JavaScript without any framework and using the @pnp/sp library.

Sample To do SharePoint Framework Client-Side Web Part built using Angular and ngOfficeUIFabric

Used SharePoint Framework Version

drop

Applies to

Solution

Solution Author(s)
sharepoint-crud Waldek Mastykarz (MVP, Rencore, @waldekm), Gautam Sheth (SharePoint Consultant, RapidCircle)

Version history

Version Date Comments
1.3 November 1, 2018 Updated to SPFx 1.6.0
1.2 March 30, 2018 Updated to SPFx 1.4.1
1.1 March 9, 2017 Updated to SPFx GA
1.0 September 16, 2016 Initial release

Disclaimer

THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.


Minimal Path to Awesome

  • clone this repo
  • in the command line run:
    • npm i
    • gulp serve --nobrowser
  • in your SharePoint Site create a list

Note: this Site should be located in a Site Collection under the /sites/ managed path, eg. https://contoso.sharepoint.com/sites/my-team-site

Features

This project contains sample client-side web parts built on the SharePoint Framework illustrating how to perform SharePoint CRUD operations on different JavaScript frameworks.

This sample illustrates the following concepts on top of the SharePoint Framework:

  • general
    • performing SharePoint CRUD operations
      • in React
      • in Angular v1.x
      • without a particular JavaScript framework
      • using the @pnp/sp library
    • using ETag to ensure data integrity when updating and deleting items
    • chaining promises for performing multiple asynchronous operations as part of one use case
    • breaking a chain of promises in case of an error and handling it gracefully
    • retrieving List Item Entity Type for modelling items in REST requests
    • optimizing REST responses for performance
  • React
    • using Office UI Fabric React components
    • using state to keep track of Web Part status and data
    • using Web Part's HttpClient in a React component
  • Angular
    • loading Angular and ngOfficeUIFabric from CDN
    • using conditional rendering for one-time Web Part setup
    • passing Web Part configuration to Angular and reacting to configuration changes in the Angular application
  • @pnp/sp library
    • using the @pnp/sp JS library with SharePoint Framework Client-Side Web Parts
    • configuring global request headers and overriding them for specific requests
    • sorting and selecting top n items from a list using the fluent API