Skip to content

Add missing 'auto' value for overflow in StyleSheets#57568

Open
JFs743 wants to merge 1 commit into
react:mainfrom
JFs743:patch-1
Open

Add missing 'auto' value for overflow in StyleSheets#57568
JFs743 wants to merge 1 commit into
react:mainfrom
JFs743:patch-1

Conversation

@JFs743

@JFs743 JFs743 commented Jul 15, 2026

Copy link
Copy Markdown

Summary:

'auto' is a valid option distinct from all other options and currently requires to do overflow: 'auto' as any to avoid a Typescript error

Changelog:

GENERAL ADDED - Add 'auto' as a valid option to StyleSheet's overflow in types (already supported by CSS)

Test Plan:

Have an item with overflow set to 'auto' in a StyleSheet:
Before the fix:

  • works, has a different behaviour than visible, hidden, scroll and undefined
  • genereates a Typescript error TS2820: Type '"auto"' is not assignable to type '"visible" | "hidden" | "scroll" | undefined'.
    StyleSheetTypes.d.ts(98, 3): The expected type comes from property 'overflow' which is declared here on type 'ViewStyle | TextStyle | ImageStyle'
  • requires a <any> cast or ts-ignore to remove the error

After the fix:

  • no Typescript error
  • no behavioral change
  • no breakage for people using the <any> cast

'auto' is a valid option distinct from all other options and currently requires to do `overflow: 'auto' as any` to avoid a Typescript error
@meta-cla

meta-cla Bot commented Jul 15, 2026

Copy link
Copy Markdown

Hi @JFs743!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@github-actions

Copy link
Copy Markdown

Caution

Invalid Changelog Format

Please verify your Changelog format. See Changelog format

@meta-cla

meta-cla Bot commented Jul 15, 2026

Copy link
Copy Markdown

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 15, 2026
@meta-cla

meta-cla Bot commented Jul 15, 2026

Copy link
Copy Markdown

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant