0

I want to display a webpart within another webpart in Sharepoint Framework.

I am using Sharepoint Framework and have created two webparts. One of them fetches information about a user, the other one displays a GroupedList(office-ui fabric react). So far I looked for answers in the microsoft documentation but I wasn't able to integrate the UserData into the GroupedList

1 Answers1

0

Brian,

It's not possible to add a webpart into another webpart.

Do the webparts share a package i.e. are they in the same solution? If so, I suggest creating 2 components for example:

  • UserInformation (which retrieves the user information)
  • ListView (which displays the groupedList)

The rendering of webpart 1 will return

<UserInformation />

The rendering of webpart 2 will return

<ListView />

When you want to combine the 2 into a single, third, webpart which renders for example:

<div>
   <h1>User Information</h1>
   <UserInformation />
   <h1>List</h1>
   <ListView />
</div>