Skip to content

Commit

Permalink
feat: ✨ method to clear the array (#1838)
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Terentiev <[email protected]>
Co-authored-by: Michaël Maillot <[email protected]>
  • Loading branch information
3 people authored Aug 12, 2024
1 parent b6d5a23 commit 03a9d8a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/controls/peoplepicker/PeoplePickerComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,14 @@ export class PeoplePicker extends React.Component<IPeoplePickerProps, IPeoplePic
}
}

/**
* clears all users and groups
*/
public clearSelectedPersons(): void {
this.setState({
selectedPersons: []
});
}

/**
* Get initial persons
Expand Down Expand Up @@ -385,6 +393,3 @@ export class PeoplePicker extends React.Component<IPeoplePickerProps, IPeoplePic
);
}
}



0 comments on commit 03a9d8a

Please sign in to comment.