Skip to content

fix(textbox, select, textarea): ensure width is maintained when a flex item#7738

Draft
nuria1110 wants to merge 1 commit intomasterfrom
FE-7576
Draft

fix(textbox, select, textarea): ensure width is maintained when a flex item#7738
nuria1110 wants to merge 1 commit intomasterfrom
FE-7576

Conversation

@nuria1110
Copy link
Contributor

@nuria1110 nuria1110 commented Jan 27, 2026

fix #7718

Proposed behaviour

Add flex-grow: 1 to Select, FormField (Textbox) and Textarea outermost container to ensure they extend to maximum width available when rendered within a flexbox.

image

Current behaviour

Select, Textbox and Textarea components default to minimum content width when they are flex items.

image

Checklist

  • Commits follow our style guide
  • Related issues linked in commit messages if required
  • Screenshots are included in the PR if useful
  • All themes are supported if required
  • Unit tests added or updated if required
  • Playwright automation tests added or updated if required
  • Storybook added or updated if required
  • Translations added or updated (including creating or amending translation keys table in storybook) if required
  • Typescript d.ts file added or updated if required
  • Related docs have been updated if required

QA

  • Tested in provided StackBlitz sandbox/Storybook
  • Add new Playwright test coverage if required
  • Carbon implementation matches Design System/designs
  • UI Tests GitHub check reviewed if required

Additional context

Testing instructions

See https://stackblitz.com/edit/parsium-carbon-starter-nglktc7h?file=src%2FApp.tsx for issue demo.
See new story InFlexContainer for fix in Textbox, Textarea and Select.

DipperTheDan
DipperTheDan previously approved these changes Jan 29, 2026
edleeks87
edleeks87 previously approved these changes Feb 2, 2026
@nuria1110 nuria1110 marked this pull request as ready for review February 2, 2026 09:50
@nuria1110 nuria1110 requested review from a team as code owners February 2, 2026 09:50
@nuria1110 nuria1110 dismissed stale reviews from edleeks87 and DipperTheDan via f1a49f6 February 2, 2026 15:55
@nuria1110 nuria1110 force-pushed the FE-7576 branch 2 times, most recently from f1a49f6 to b05a492 Compare February 2, 2026 15:56
…ce when a flex item

Adds flex-grow: 1 to Textbox, Select and Textarea components to ensure they extend the width
of the available space when they are flex items.

This change also applies to any component using Textbox internally, e.g Password.

fix #7718
@nuria1110 nuria1110 marked this pull request as draft February 4, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

SimpleSelect: selected value does not size input based on option text when used in flex layouts

3 participants