How to use the @pnp/spfx-property-controls/lib/PropertyFieldListPicker.PropertyFieldListPicker function in @pnp/spfx-property-controls

To help you get started, we’ve selected a few @pnp/spfx-property-controls examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pnp / FilterPack / src / webparts / choiceFilter / ChoiceFilterWebPart.ts View on Github external
type: CustomCollectionFieldType.string,
            }
          ]
        })
      );
      filterPaneFields.push(...this.buildFilterPaneFields([
        {key:'key', text:'Key'},
        {key:'text', text:'Text'},
        {key:'filterValue', text:'Filterable Value'},
      ], 'filterValue'));
    }

    if(this.properties.choiceType === 'list') {

      choicesPaneFields.push(
        PropertyFieldListPicker('listId', {
          label: 'List/Library',
          selectedList: this.properties.listId,
          includeHidden: false,
          orderBy: PropertyFieldListPickerOrderBy.Title,
          onPropertyChange: this.onPropertyPaneFieldChanged.bind(this),
          properties: this.properties,
          context: this.context,
          onGetErrorMessage: null,
          deferredValidationTime: 0,
          key: 'listId',
        })
      );

      //List Details
      if(this.properties.listId) {
        //If a list has been chosen, we need view details
github SharePoint / sp-dev-fx-webparts / samples / react-securitygrid / src / webparts / spSecurity / SpSecurityWebPart.ts View on Github external
text: "Let user select Lists"
                }),

              ]
            },
            {
              groupName: "Select Lists",
              groupFields: [
                PropertyPaneToggle("includeAdminSelectedLists", {
                  label: "Inclued/exclude selected lists",
                  onText: "Include selected lists",
                  offText: "Exclude selected lists",


                }),
                PropertyFieldListPicker("adminSelectedLists", {
                  label: 'Select lists to include/exclude',
                  selectedList: this.properties.adminSelectedLists,
                  includeHidden: this.properties.showHiddenLists,
                  orderBy: PropertyFieldListPickerOrderBy.Title,
                  disabled: false,
                  onPropertyChange: this.onPropertyPaneFieldChanged.bind(this),
                  properties: this.properties,
                  context: this.context,
                  onGetErrorMessage: null,
                  deferredValidationTime: 0,
                  key: 'listPickerFieldId',
                  multiSelect: true
                }),
              ]
            }
          ]

@pnp/spfx-property-controls

Reusable property pane controls for SharePoint Framework solutions

MIT
Latest version published 11 days ago

Package Health Score

73 / 100
Full package analysis