Skip to content

Conversation

@sfc-gh-alisowski
Copy link

@sfc-gh-alisowski sfc-gh-alisowski commented Jul 24, 2025

I was experiencing a bug where:

  • a select with maxHeight set on it rendered in a dialog
  • if the select has lots of options it would always flip, no matter the available space

I traced the code to here where it disregards the userSetMaxHeight when determining if needed to flip

Closes

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

Snowflake

Copy link
Member

@snowystinger snowystinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. The change looks right, but can you provide a reproduction so we can verify the fix? a storybook story is fine
I attempted to see if it fixed #7897 or #7960 to no avail unfortunately.

@sfc-gh-alisowski
Copy link
Author

Will do. I'm about to go on a 2 week vacation but will def look when I'm back

@snowystinger snowystinger added the waiting Waiting on Issue Author label Sep 10, 2025
@snowystinger
Copy link
Member

I tired to reproduce this in

with no luck

@sfc-gh-alisowski
Copy link
Author

Sorry it took me so long but here is a repro!

https://stackblitz.com/edit/vitejs-vite-m7yj7gpt?file=src%2FApp.tsx,src%2Fmain.tsx

@sfc-gh-alisowski
Copy link
Author

In your example you aren't using maxHeight so you aren't hitting the bug

@sfc-gh-alisowski
Copy link
Author

I checked the nightly and #8848 fixed the issue 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting Waiting on Issue Author

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants