Creating people webpart using Sharepoint list

Copper Contributor

Hello everybody :) I'm doing my first webpart using React. My goal is to fetch all the users from a Sharepoint list I created and display them in the webpart. Why I'm using this approach and not getting user data from Office Graph is that users data include lots of customized information like projects and skills and lots of other. I would need some help regarding how to display the data and other search and sorting related stuff. 


I'd like to sort and display the users by their job type (designer etc.). So there would be a header like Designer and then the users who are designers and so forth. How is this accomplished in data perspective when it is fetched with SP-HTTP? Should I fetch everything in one go and then do some sorting in webpart creating different sets and loop through those or should I do multiple SP-HTTP fetches to every job type? This same is related with search and filtering when I'm going to implement those. When I search for example is the once fetched data implemented in this ore do I have to do multiple fetches.


Other things that came to my mind is that what layout method to use? I'd like to have the users in grid like structure. Would I build a grid using UI-Fabric or use some other approach? I'm also using Persona (UI-Fabric) to present the user and I'd like to every Persona behave as a button that is clickable so I can see detailed information about the user. Should I use Persona wrapped inside button element or something else? 


Thanks for your help in advance :)

0 Replies