This web part provides you the ability to display a list of a particular user's recently used documents on a web page. The web part may be configured to display a pre-defined number of documents at a time. This web part is powered by the Microsoft Graph and uses the me/insights/used Graph endpoint, while filtering out document types including: "Web", "spsite", "Folder", "Archive", "Image", and "Other".
- Place the page you want to add this web part to in edit mode.
- Search for and insert the Recently Used Documents web part.
- Configure the web part to update its properties.
The Recently Used Documents
web part can be configured with the following properties:
Label | Property | Type | Required | Description |
---|---|---|---|---|
Recent Documents | title | string | no | The web part title, editable inline with the web part itself |
Specify the number of documents to show | nrOfItems | number | no | Default: 3 - The number of documents to show |
- Supported in SharePoint Online
Permissions to Microsoft Graph - scope: "Sites.Read.All"
Solution | Author(s) |
---|---|
solution/src/webparts/recentlyUsedDocuments | Elio Struyf (@struyf) |
react-recently-used-documents | Sébastien Levert (@sebastienlevert) |
react-recently-used-documents | Chandani Prajapati (@Chandani_SPD) |
Version | Date | Comments |
---|---|---|
1.0 | March 28, 2018 | Initial release |
2.0 | December 29, 2019 | v2.0 |
3.0 | February 2023 | Initial release for SharePoint Starter Kit v3 (Upgraded to SPFx 1.16.1) |
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.
- Clone this repository
- Move to solution folder
- in the command line run:
npm install
gulp serve
Description of the web part with possible additional details than in short summary. This Web Part illustrates the following concepts on top of the SharePoint Framework:
- Using Microsoft Graph from the web parts with queries and filters
- Using Lists from FluentUI
- Using Webpack Chunking for bundle management
- Using PnP Property Controls (number)