Getting Document Library webpart state from a custom SPFx webpart

Copper Contributor

Hi,

 

We have a site page that contains a built-in document library webpart. When the user navigates into a folder in the library, we would like to take that folder name and use that to look up further information using an API exposed by our custom SPFx webpart on the same page which then displays that folder's associated information.

 

Is it possible to query the state of the document library webpart to get the currently-selected folder and use it programmatically in our custom SPFx webpart? If not, it would be great to know if there any alternative ways to implement this idea using modern SharePoint webparts.

 

Many thanks,

Richard

0 Replies