Skip to content

Commit

Permalink
Merge pull request #1743 from NishkalankBezawada/Update-FolderPicker-…
Browse files Browse the repository at this point in the history
…Documentation

Update Folderpicker documentation on how to use the control with siteAbsoluteUrl property
  • Loading branch information
AJIXuMuK authored Feb 11, 2024
2 parents 36a14c6 + c63df4a commit 285ed6a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/documentation/docs/controls/FolderPicker.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,19 @@ import { FolderPicker, IFolder } from "@pnp/spfx-controls-react/lib/FolderPicker
canCreateFolders={true} />
```

- To use the `FolderExplorer` control to fetch folders from different sitecollection in your code as follows:

```TypeScript
<FolderExplorer context={this.props.context}
rootFolder={{
Name: 'Documents',
ServerRelativeUrl: `/sites/TestSite2/Shared Documents`
}}
onSelect={this._onFolderSelect}
canCreateFolders={true}
siteAbsoluteUrl="https://xxxx.sharepoint.com/sites/TestSite2"/>
```

- The `onSelect` change event returns the selected folder and can be implemented as follows:

```TypeScript
Expand Down

0 comments on commit 285ed6a

Please sign in to comment.