How to get the selected "Person Type" (user or group) from the people picker #2646
Unanswered
hesperanca
asked this question in
Q&A
Replies: 1 comment 4 replies
-
That is a good question. I assume you are using TypeScript and the Group information is hidden from the IDynamicPerson. Adding @Mnickii to investigate as when using JS (for instance here: https://mgt.dev/?path=/story/components-mgt-people-picker--selection-changed-event) we can see the different data shapes, but in TS I'm expecting the typed response hides a lot of the information (especially the property |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The people picker control has an event called "SelectionChanged" that is raised when a user or group is selected in the people picker. It also has a property called "selectedPeople" that list the users and groups that have been selected. Both the event and the property return an array of IDynamicPerson objects.
My problem is that I cannot find a way to distinguish between users and groups. The IDynamicPerson interface does not offer a property to distinguish them. Does anyone know how to distinguish the users from the groups on the returned IDynamicPerson array?
Beta Was this translation helpful? Give feedback.
All reactions