How can I add list of the files with category from the SPO library to WebPart Property Pane?

Brass Contributor

Hi!
I have a Sharepoint Online library with files divided into categories. 
Screenshot_38.png
And I try to create my WebPart to show file only for specific category.
How can I add filter to the Property Pane in the Webpart, so that I can first select a category, and a list of files according to this category will be displayed, and then select the file I need from there?
Screenshot_39.png
Could you please tell me how to add this to Property Pane ?
Because now I have empty fields.

protected getPropertyPaneConfiguration(): IPropertyPaneConfiguration {
    return {
      pages: [
        {
          header: {
            description: strings.PropertyPaneDescription
          },
          groups: [
            {
              groupName: strings.BasicGroupName,
              groupFields: [
                PropertyPaneTextField('description', {
                  label: strings.DescriptionFieldLabel
                }),
                PropertyPaneDropdown('selectedCategory', {
                  label: 'Select a Category',
                  options: this.listsDropdownOptions,
                }),
                PropertyPaneDropdown('selectedFile', {
                  label: 'Select a File',
                  options: this.listsDropdownOptions,
                })
              ]
            }
          ]
        }
      ]
    };
  }
0 Replies