Skip to content

DynamicDataSharedDepth undefined in hosted workbench (SPFx 1.8.1) #3820

@YannickRe

Description

@YannickRe

Category

  • Question
  • Typo
  • Bug
  • Additional article idea

Expected or Desired Behavior

When running an SPFx 1.8.1 solution that uses Dynamic Data with 'gulp serve', I expect it to work correctly in the local workbench, the hosted workbench and SharePoint pages.

Observed Behavior

Running the solution works without an issue in the local workbench and SharePoint pages, but in the hosted workbench it throws the following exception: "Cannot read property 'Source' of undefined". Issues occurs with DynamicDataSharedDepth.Source

HostedWorkbench181

The error doesn't occur when using SPFx 1.7.1. It starts occurring when I upgraded the solution to 1.8.1 with the guidance from the Office 365 CLI and only when opening the Property Pane.
Also occurs in a newly created solution. Tested on 3 different tenants, with Google Chrome.

Steps to Reproduce

  • Create new SPFx 1.8.1 solution, keep defaults and I based it on React
  • Put the following code in the existing groupFields array of the property pane (update the imports):
PropertyPaneDynamicFieldSet({
                  label: "Keywords",

                  fields: [
                      PropertyPaneDynamicField('queryKeywords', {
                          label: "Keywords"
                      })
                  ],
                  sharedConfiguration: {
                      depth: DynamicDataSharedDepth.Source,
                  },
                })
  • Run gulp serve.
  • Open the property pane of the webpart. In the local workbench, it works. In the hosted workbench, you will find the following error in the developer console:
Uncaught (in promise) TypeError: Cannot read property 'Source' of undefined
    at HelloWorldWebPart.getPropertyPaneConfiguration (HelloWorldWebPart.ts:65)
    at sp-webpart-workbench-assembly_en-us_adc4bc24c9e68c9e1b136ddf960e5a9d.js:605

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:spfxCategory: SharePoint Framework (not extensions related)status:fixed-next-dropIssue planned to be fixed in an upcoming release.status:trackedCurrently tracked with Microsoft’s internal issue tracking system. DO NOT ADD/REMOVE (MSFT managed)type:bug-suspectedSuspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions