How to use the @pnp/spfx-property-controls/lib/PropertyFieldCollectionData.CustomCollectionFieldType.string 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
{
              id: 'key',
              title: 'Key',
              type: CustomCollectionFieldType.string,
              required: true
            },
            {
              id: 'text',
              title: 'Text',
              type: CustomCollectionFieldType.string,
              required: true
            },
            {
              id: 'filterValue',
              title: 'Filterable Value',
              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',
github SharePoint / sp-dev-fx-webparts / samples / react-search-refiners / spfx / src / webparts / searchResults / SearchResultsWebPart.ts View on Github external
text: strings.ResultTypes.GreaterThanOperator
                                },
                                {
                                    key: ResultTypeOperator.LessOrEqual,
                                    text: strings.ResultTypes.LessOrEqualOperator
                                },
                                {
                                    key: ResultTypeOperator.LessThan,
                                    text: strings.ResultTypes.LessThanOperator
                                }
                            ]
                        },
                        {
                            id: 'value',
                            title: strings.ResultTypes.ConditionValueLabel,
                            type: CustomCollectionFieldType.string,
                            required: false,
                        },
                        {
                            id: "inlineTemplateContent",
                            title: "Inline template",
                            type: CustomCollectionFieldType.custom,
                            onCustomRender: (field, value, onUpdate) => {
                                return (
                                    React.createElement("div", null,
                                        React.createElement(this._textDialogComponent.TextDialog, {
                                            language: this._propertyFieldCodeEditorLanguages.Handlebars,
                                            dialogTextFieldValue: value ? value : dialogTextFieldValue,
                                            onChanged: (fieldValue) => onUpdate(field.id, fieldValue),
                                            strings: {
                                                cancelButtonText: strings.CancelButtonText,
                                                dialogButtonText: strings.DialogButtonText,
github pnp / FilterPack / src / webparts / choiceFilter / ChoiceFilterWebPart.ts View on Github external
})
    ];

    if(this.properties.choiceType === 'custom') {
      choicesPaneFields.push(
        PropertyFieldCollectionData('customChoices', {
          key: 'customChoices',
          label: 'Custom Choices',
          panelHeader: 'Custom Choices',
          manageBtnLabel: 'Manage Choices',
          value: this.properties.customChoices,
          fields: [
            {
              id: 'key',
              title: 'Key',
              type: CustomCollectionFieldType.string,
              required: true
            },
            {
              id: 'text',
              title: 'Text',
              type: CustomCollectionFieldType.string,
              required: true
            },
            {
              id: 'filterValue',
              title: 'Filterable Value',
              type: CustomCollectionFieldType.string,
            }
          ]
        })
      );
github SharePoint / sp-dev-fx-webparts / samples / react-search-refiners / spfx / src / webparts / searchResults / SearchResultsWebPart.ts View on Github external
return ({
                        key: prop,
                        text: prop
                    });
                });
                stylingFields.push(PropertyFieldCollectionData('customTemplateFieldValues', {
                    key: 'customTemplateFieldValues',
                    label: strings.customTemplateFieldsLabel,
                    panelHeader: strings.customTemplateFieldsPanelHeader,
                    manageBtnLabel: strings.customTemplateFieldsConfigureButtonLabel,
                    value: this.properties.customTemplateFieldValues,
                    fields: [
                        {
                            id: 'fieldName',
                            title: strings.customTemplateFieldTitleLabel,
                            type: CustomCollectionFieldType.string,
                        },
                        {
                            id: 'searchProperty',
                            title: strings.customTemplateFieldPropertyLabel,
                            type: CustomCollectionFieldType.dropdown,
                            options: searchPropertyOptions
                        }
                    ]
                }));
            }
        }

        return stylingFields;
    }

@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