Skip to content

Commit

Permalink
Merge pull request #1620 from NishkalankBezawada/Issue-1612
Browse files Browse the repository at this point in the history
Fixing issue 1612 & 1603 - PeoplePicker won't accept Multiple Users with the same name
  • Loading branch information
joaojmendes committed Sep 23, 2023
2 parents f299cd0 + ed83c85 commit fbe0e3f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/controls/peoplepicker/PeoplePickerComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ export class PeoplePicker extends React.Component<IPeoplePickerProps, IPeoplePic
if (!personas || !personas.length || personas.length === 0) {
return false;
}
return personas.filter(item => item.text === persona.text).length > 0;
return personas.some(item => item.text === persona.text && item.secondaryText === persona.secondaryText);
}


Expand Down
4 changes: 2 additions & 2 deletions src/webparts/controlsTest/components/ControlsTest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1502,7 +1502,7 @@ export default class ControlsTest extends React.Component<IControlsTestProps, IC

<PeoplePicker context={this.props.context}
titleText="People Picker (tenant scoped)"
personSelectionLimit={5}
personSelectionLimit={10}
// groupName={"Team Site Owners"}
showtooltip={true}
required={true}
Expand All @@ -1511,7 +1511,7 @@ export default class ControlsTest extends React.Component<IControlsTestProps, IC
onChange={this._getPeoplePickerItems}
showHiddenInUI={false}
principalTypes={[PrincipalType.User, PrincipalType.SharePointGroup, PrincipalType.SecurityGroup, PrincipalType.DistributionList]}
suggestionsLimit={2}
suggestionsLimit={5}
resolveDelay={200}
placeholder={'Select a SharePoint principal (User or Group)'}
onGetErrorMessage={async (items: any[]) => {
Expand Down

0 comments on commit fbe0e3f

Please sign in to comment.