Skip to content

[DataObject Editor] Field Container "width" setting is ignored (always renders full width) #3922

Description

@alexbaat

Bug description

The width configured on a Field Container layout element in a DataObject class definition is ignored by the Studio UI. Regardless of the value entered in the class editor, the container is always rendered at full width and its child fields are distributed with equal flex.

The width value is correctly persisted in the class definition (e.g. 'width' => 400 on the Layout\Fieldcontainer node), but it is never read or applied when rendering the object editor.

Steps to reproduce

  1. Open a DataObject class in the class editor.
  2. Add a Field Container (layout hbox or vbox) with a few fields inside it.
  3. Set the Field Container width to e.g. 400.
  4. Save the class and open/edit an object of that class in Studio.

Expected behaviour

The Field Container respects the configured width (as it did in the legacy admin UI).

Actual behaviour

The width setting has no effect. The container always takes full width and the children are laid out with equal flex: 1.

Cause

In assets/js/src/core/modules/element/dynamic-types/definitions/objects/layout-related/components/field-container/field-container.tsx (tag v2026.2.1):

  • Line ~23 — the component destructures only { children, collapsible, collapsed, noteditable, layout = 'hbox', fieldLabel }; width is not among the props it reads.
  • Line ~30 — the outer container is hardcoded to className='w-full'.
  • Line ~38 — each child is wrapped in <Flex flex={ 1 } />, forcing equal distribution.

So the persisted width is never mapped to a style/width on the container.

Affected versions

Reproduced on 2026.1.6; source inspection confirms the same behaviour on the current 2026.2.1. The only 2026 commits touching this file (#3580 vbox support, #3754 noteditable flag) do not address width.

Environment

  • Pimcore Studio UI bundle: 2026.1.6 (also confirmed in 2026.2.1 source)
  • Pimcore: 2026.1
  • PHP 8.5, Symfony 7.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Affected capability

    None yet

    Platform Version

    None yet

    Galaxy

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions