Skip to content

FormFields don't flex anymore in 2.30.0 #6669

@kariwhitcomb

Description

@kariwhitcomb

Expected Behavior

We have a layout with multiple FormFields inside a Box with direction='row'. With version 2.29.1 and earlier of grommet, these FormFields would flex, so if the wrapping Box was narrow, the fields would narrow too. Wider Box/screen, and the FormFields would expand.

Actual Behavior

In Version 2.30.0, the FormFields no longer flex. They seem to use a default width and will overflow the Box if it is too narrow

URL, screen shot, or Codepen exhibiting the issue

https://codesandbox.io/s/nifty-james-9yvrku?file=/src/App.js
This is setup with 2.29.1 in the dependency, but you can switch to 2.30.0 with the same code and see the change in behavior.

This may be related to #6626

Steps to Reproduce

<Grommet theme={hpe}>
      <Box direction="row" gap="medium">
        <FormField label="Input 1">
          <Select options={options} />
        </FormField>
        <FormField label="Input 2">
          <Select options={options} />
        </FormField>
        <FormField label="Input 3">
          <Select options={options} />
        </FormField>
        <FormField label="Input 4">
          <Select options={options} />
        </FormField>
      </Box>
    </Grommet>

Your Environment

  • Grommet version: 2.30.0
  • Browser Name and version: Chrome
  • Operating System and version (desktop or mobile): Mac

Metadata

Metadata

Labels

regressionAn issue reporting a regression or a PR that fixes a regression

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions