@@ -67,10 +67,10 @@ export class PeoplePicker extends React.Component<IPeoplePickerProps, IPeoplePic
67
67
* Get initial persons
68
68
*/
69
69
private async getInitialPersons ( props : IPeoplePickerProps ) {
70
- const { groupName } = props ;
70
+ const { groupName, webAbsoluteUrl , defaultSelectedUsers , ensureUser , principalTypes } = props ;
71
71
// Check if a group property was provided, and get the group ID
72
72
if ( groupName ) {
73
- this . groupId = await this . peopleSearchService . getGroupId ( props . groupName , props . webAbsoluteUrl ) ;
73
+ this . groupId = await this . peopleSearchService . getGroupId ( groupName , webAbsoluteUrl ) ;
74
74
if ( ! this . groupId ) {
75
75
this . setState ( {
76
76
errorMessage : "Group could not be found."
@@ -82,10 +82,10 @@ export class PeoplePicker extends React.Component<IPeoplePickerProps, IPeoplePic
82
82
}
83
83
84
84
// Check for default user values
85
- if ( props . defaultSelectedUsers ) {
85
+ if ( defaultSelectedUsers ) {
86
86
let selectedPersons : IPersonaProps [ ] = [ ] ;
87
87
for ( const userValue of props . defaultSelectedUsers ) {
88
- const userResult = await this . peopleSearchService . searchPersonByEmailOrLogin ( userValue , props . principalTypes , props . webAbsoluteUrl , this . groupId , props . ensureUser ) ;
88
+ const userResult = await this . peopleSearchService . searchPersonByEmailOrLogin ( userValue , principalTypes , webAbsoluteUrl , this . groupId , ensureUser ) ;
89
89
if ( userResult ) {
90
90
selectedPersons . push ( userResult ) ;
91
91
}
0 commit comments