Skip to content

Commit d995939

Browse files
add new property to people picker for source url
1 parent 3daeac4 commit d995939

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ 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
147148
const restApi = `${this.props.context.pageContext.web.absoluteUrl}${stringVal}`;
148149

0 commit comments

Comments
 (0)