Skip to content

Commit b870819

Browse files
Merge branch 'pnp:v2-dev' into v2-dev
2 parents 6ee3420 + 3357f56 commit b870819

File tree

5 files changed

+18
-7
lines changed

5 files changed

+18
-7
lines changed

CHANGELOG.JSON

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,19 @@
77
"`DynamicForm`: New Control: Dynamic form [#878](https://github.com/pnp/sp-dev-fx-controls-react/issues/878)"
88
],
99
"enhancements": [
10-
"`ComboBoxListItemPicker` and `ListItemPicker`: Add label to control [#910](https://github.com/pnp/sp-dev-fx-controls-react/pull/910)"
10+
"`ComboBoxListItemPicker` and `ListItemPicker`: Add label to control [#910](https://github.com/pnp/sp-dev-fx-controls-react/pull/910)",
11+
"`PeoplePicker`: new property `groupId`. [#917](https://github.com/pnp/sp-dev-fx-controls-react/pull/917)"
1112
],
1213
"fixes": [
13-
"`SitePicker`: `SitePicker` does not display initialsites until you click the dropdown to select [#895](https://github.com/pnp/sp-dev-fx-controls-react/issues/895)"
14+
"`SitePicker`: `SitePicker` does not display initialsites until you click the dropdown to select [#895](https://github.com/pnp/sp-dev-fx-controls-react/issues/895)",
15+
"`FilePicker`: invalid CSS: relative in quotes. [#930](https://github.com/pnp/sp-dev-fx-controls-react/pull/930)"
1416
]
1517
},
1618
"contributions": [
17-
"[Ravichandran Krishnasamy](https://github.com/ravichandran-blog)",
18-
"[Peter Paul Kirschner](https://github.com/petkir)"
19+
"[Nikolay Belykh](https://github.com/nbelyh)",
20+
"[Patrik Hellgren](https://github.com/patrikhellgren)",
21+
"[Peter Paul Kirschner](https://github.com/petkir)",
22+
"[Ravichandran Krishnasamy](https://github.com/ravichandran-blog)"
1923
]
2024
},
2125
{

docs/documentation/docs/controls/PeoplePicker.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ The People picker control can be configured with the following properties:
5757
| ---- | ---- | ---- | ---- | ---- |
5858
| context | WebPartContext | yes | Context of the current web part. | |
5959
| titleText | string | no | Text to be displayed on the control | |
60-
| groupName | string | no | group from which users are fetched. Leave it blank if need to filter all users | _none_ |
60+
| groupName | string | no | Group from which users are fetched. Leave it blank if need to filter all users. When both groupName and groupId specified groupName takes precedence. | _none_ |
61+
| groupId | number | no | Group from which users are fetched. Leave it blank if need to filter all users. When both groupId and groupName specified groupName takes precedence. | _none_ |
6162
| personSelectionLimit | number | no | Defines the limit of people that can be selected in the control | 1 |
6263
| required | boolean | no | Set if the control is required or not | false |
6364
| disabled | boolean | no | Set if the control is disabled or not | false |

src/controls/filePicker/FilePicker.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@
176176
}
177177
.scrollablePaneWrapper {
178178
height: 75vh;
179-
position: 'relative';
179+
position: relative;
180180
overflow: hidden;
181181
}
182182

src/controls/peoplepicker/IPeoplePicker.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ export interface IPeoplePickerProps {
3030
*/
3131
groupName?: string;
3232
/**
33+
* Id of SharePoint Group
34+
*/
35+
groupId?: number;
36+
/**
3337
* Maximum number of suggestions to show in the full suggestion list. (default: 5)
3438
*/
3539
suggestionsLimit?: number;

src/controls/peoplepicker/PeoplePickerComponent.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export class PeoplePicker extends React.Component<IPeoplePickerProps, IPeoplePic
7575
* Get initial persons
7676
*/
7777
private async getInitialPersons(props: IPeoplePickerProps) {
78-
const { groupName, webAbsoluteUrl, defaultSelectedUsers, ensureUser, principalTypes } = props;
78+
const { groupName, groupId, webAbsoluteUrl, defaultSelectedUsers, ensureUser, principalTypes } = props;
7979
// Check if a group property was provided, and get the group ID
8080
if (groupName) {
8181
this.groupId = await this.peopleSearchService.getGroupId(groupName, webAbsoluteUrl);
@@ -85,6 +85,8 @@ export class PeoplePicker extends React.Component<IPeoplePickerProps, IPeoplePic
8585
});
8686
return;
8787
}
88+
} else if (groupId) {
89+
this.groupId = groupId;
8890
} else {
8991
this.groupId = null;
9092
}

0 commit comments

Comments
 (0)