Skip to content

[bug]: @container/field-group not allowing div to grow #9301

@frankulyn

Description

@frankulyn

Describe the bug

@container/field-group on the field-group div is not allowing it to grow if the children overflow.

return (
    <div className="space-y-2">
      <form id="delivery-price-form" onSubmit={form.handleSubmit(onSubmit)}>
        <FieldGroup className="gap-4 grow">
          <div className="border w-100">test</div>
          {/* <CategoryController
            level={0}
            control={form.control}
            categories={categories}
          /> */}
        </FieldGroup>
      </form>
      <div className="flex items-center gap-2 w-full justify-between">
        <Button variant="outline" onClick={handleReset} disabled={isLoading}>
          <RotateCcwIcon />
          Poništi
        </Button>
        <Button type="submit" form="delivery-price-form" disabled={isLoading}>
          {!isLoading ? <SaveIcon /> : <LoaderIcon className="animate-spin" />}
          {!isLoading ? "Spremi" : "Spremam..."}
        </Button>
      </div>
    </div>
  );

Video:

CleanShot.2026-01-07.at.22.55.27.mp4

Affected component/components

FieldGroup

How to reproduce

  1. Create a form
  2. Add FieldGroup
  3. Add div with border inside FieldGroup that is very large
  4. In dev-tools toggle the @container/field-group

Codesandbox/StackBlitz link

No response

Logs

System Info

macOS
Helium

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions