Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/#958 Add selected items for groups #962

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/services/PeopleSearchService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export default class SPPeopleSearchService {
switch (element.EntityType) {
case 'User':
const accountName: string = element.Description || "";
const email: string = element.EntityData.Email || element.Description;
const email: string = element.EntityData?.Email || element.Description;
return {
id: element.Key,
loginName: element.LoginName ? element.LoginName : element.Key,
Expand All @@ -240,12 +240,13 @@ export default class SPPeopleSearchService {
optionalText: "" // anything
} as IPeoplePickerUserItem;
case 'SecGroup':
const secondaryText = element.EntityData?.Email || element.ProviderName
return {
id: element.Key,
loginName: element.LoginName ? element.LoginName : element.Key,
imageInitials: this.getFullNameInitials(element.DisplayText),
text: element.DisplayText,
secondaryText: element.ProviderName
secondaryText,
} as IPeoplePickerUserItem;
case 'FormsRole':
return {
Expand Down