Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dynamic Form] Cannot read properties of undefined (reading 'sections') #1788

Open
wuxiaojun514 opened this issue Mar 6, 2024 · 3 comments
Assignees
Labels
status:working-on-it Known issue / feature being addressed. Will use other "status:*" labels & comments for more detail. type:bug

Comments

@wuxiaojun514
Copy link
Contributor

Category

[ ] Enhancement

[x] Bug

[ ] Question

Version

Please specify what version of the library you are using: [ 3.17 ]

Observed Behavior

It will show "Cannot read properties of undefined (reading 'sections')" error when you use [Dynamic Form] on a list which has empty ClientFormCustomFormatter
image

Steps to Reproduce

  1. Prepare a test list and click "Config Layout"
    image
  2. Paste some view formatting json code ,then remove it (Sometimes you want to try "Custom Formatting" first before using Dynamic Form, so you may have empty ClientFormCustomFormatter)
    image
  3. Using Dynamic Form Control on this list, then you will get "Cannot read properties of undefined (reading 'sections')" error

My Temp Solution

I cannot remove ClientFormCustomFormatter in the UI. I used PnP Powershell to remove this property
image

@ghost
Copy link

ghost commented Mar 6, 2024

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@ghost ghost added the Needs: Triage 🔍 label Mar 6, 2024
@Ruslan-Urban
Copy link

I am experiencing the same issue.
image

When I configure layout sections, the number of controls in each section varies. Is there a way to define number of columns or define control widths (e.g. 25%, 33%, 50%)?

When there is one section, controls are unusable - too small

{
    "sections": [
        {
            "displayname": "",
            "fields": []
        }
    ]
}

image

@Haiqi-Wu
Copy link

Same Issue.

wuxiaojun514 added a commit to wuxiaojun514/sp-dev-fx-controls-react that referenced this issue Nov 28, 2024
wuxiaojun514 added a commit to wuxiaojun514/sp-dev-fx-controls-react that referenced this issue Nov 29, 2024
and add styles/className property to support styling customization, should somehow fix pnp#1794
@michaelmaillot michaelmaillot added status:working-on-it Known issue / feature being addressed. Will use other "status:*" labels & comments for more detail. type:bug and removed Needs: Triage 🔍 labels Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:working-on-it Known issue / feature being addressed. Will use other "status:*" labels & comments for more detail. type:bug
Projects
None yet
Development

No branches or pull requests

4 participants