Skip to content

When using LayoutGridField & mui theme with an array field, size of grid makes wrapping impossible #4854

@legomind

Description

@legomind

Prerequisites

What theme are you using?

mui

Version

6.0.1

Current Behavior

When using a uiSchema like this:

{
    "Sources": {
        "ui:options": {
            "orderable": true,
            "removable": true
        },
        "size": 12,
        "items": {
            "ui:field": "LayoutGridField",
            "ui:layoutGrid": {
                "ui:row": {
                    "spacing": 2,
                    "children": [
                        {
                            "ui:columns": {
                                "size": 4,
                                "children": ["Type", "Owner"]
                            }
                        },
                        {
                            "ui:row": {
                                "spacing": 2,
                                "children": [ "Server", "Database", "BatchType" ]
                            }
                        }
                    ]
                }
            }
        }
    }
}

the containing grid has the size prop set to auto, causing all the items to be rendered on one row, and off of the page (overflow is set to auto as well)

Image

Expected Behavior

I would expect some way to set the container size explicitly, otherwise there is no way to get anything to flow down.
Here is what the same form looks like when size is set to 12:

Image

Steps To Reproduce

No response

Environment

- OS:
- Node:
- npm:

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions