Skip to content

Commit

Permalink
fix: people picker default selections (#2579)
Browse files Browse the repository at this point in the history
fixes logic to populate selections to check length of arrays not existence of arrays
  • Loading branch information
gavinbarron committed Jun 30, 2023
1 parent e384883 commit 49b81bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -1097,7 +1097,8 @@ export class MgtPeoplePicker extends MgtTemplatedComponent {
if (
(this.defaultSelectedUserIds?.length > 0 || this.defaultSelectedGroupIds?.length > 0) &&
!this.selectedPeople.length &&
!this.defaultSelectedUsers
!this.defaultSelectedUsers.length &&
!this.defaultSelectedGroups.length
) {
this.defaultSelectedUsers = await getUsersForUserIds(graph, this.defaultSelectedUserIds, '', this.userFilters);
this.defaultSelectedGroups = await getGroupsForGroupIds(
Expand Down
1 change: 0 additions & 1 deletion stories/components/peoplePicker/peoplePicker.properties.js
Expand Up @@ -220,7 +220,6 @@ export const pickerDefaultSelectedUserIds = () => html`
<mgt-people-picker
default-selected-user-ids="e3d0513b-449e-4198-ba6f-bd97ae7cae85, 40079818-3808-4585-903b-02605f061225">
</mgt-people-picker>
</mgt-people-picker>
`;

export const pickerDefaultSelectedGroupIds = () => html`
Expand Down

0 comments on commit 49b81bf

Please sign in to comment.