Skip to content

Commit bd57671

Browse files
committed
Merge branch 'joelfmrodrigues-people-picker-source-site' into dev
2 parents de5c10a + c75590f commit bd57671

File tree

8 files changed

+32
-3
lines changed

8 files changed

+32
-3
lines changed

CHANGELOG.JSON

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
{
22
"versions": [
3+
{
4+
"version": "1.8.0",
5+
"changes": {
6+
"new": [],
7+
"enhancements": [
8+
"`PeoplePicker`: ability to specify the source site to load users from [#110](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/110)"
9+
],
10+
"fixes": []
11+
},
12+
"contributions": ["Joel Rodrigues"]
13+
},
314
{
415
"version": "1.7.0",
516
"changes": {

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Releases
22

3+
## 1.8.0
4+
5+
**Enhancements**
6+
7+
- `PeoplePicker`: ability to specify the source site to load users from [#110](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/110)
8+
39
## 1.7.0
410

511
**Enhancements**

docs/documentation/docs/about/release-notes.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Releases
22

3+
## 1.8.0
4+
5+
**Enhancements**
6+
7+
- `PeoplePicker`: ability to specify the source site to load users from [#110](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/110)
8+
39
## 1.7.0
410

511
**Enhancements**

docs/documentation/docs/controls/PeoplePicker.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ The People picker control can be configured with the following properties:
6767
| peoplePickerWPclassName | string | no | applies custom styling to the people picker element |
6868
| peoplePickerCntrlclassName | string | no | applies custom styling to the people picker control only |
6969
| defaultSelectedUsers | string[] | no | Default selected user emails |
70+
| webAbsoluteUrl | string | no | Specify the site URL on which you want to perform the user query call. Default is the current site URL. |
7071

7172

7273
![](https://telemetry.sharepointpnp.com/sp-dev-fx-controls-react/wiki/controls/PeoplePicker)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@pnp/spfx-controls-react",
33
"description": "Reusable React controls for SharePoint Framework solutions",
4-
"version": "1.7.0",
4+
"version": "1.8.0",
55
"engines": {
66
"node": ">=0.10.0"
77
},

src/common/telemetry/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const version: string = "1.7.0";
1+
export const version: string = "1.8.0";

src/controls/peoplepicker/IPeoplePicker.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ export interface IPeoplePickerProps {
1414
* Text of the Control
1515
*/
1616
titleText: string;
17+
/**
18+
* Web Absolute Url of source site
19+
*/
20+
webAbsoluteUrl?: string;
1721
/**
1822
* Whether the control is enabled or not
1923
*/

src/controls/peoplepicker/PeoplePickerComponent.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,9 @@ export class PeoplePicker extends React.Component<IPeoplePickerProps, IPeoplePic
143143
stringVal = "/_api/web/siteusers";
144144
}
145145

146+
const webAbsoluteUrl = this.props.webAbsoluteUrl || this.props.context.pageContext.web.absoluteUrl;
146147
// Create the rest API
147-
const restApi = `${this.props.context.pageContext.web.absoluteUrl}${stringVal}`;
148+
const restApi = `${webAbsoluteUrl}${stringVal}`;
148149

149150
try {
150151
// Call the API endpoint

0 commit comments

Comments
 (0)