feat: Update default menu placement to "auto"#373
Merged
Conversation
|
|
📊 Package size report 0.3%↑
Unchanged files
🤖 This report was automatically generated by pkg-size-action |
jonahallibone
approved these changes
Jan 9, 2026
csandman
commented
Jan 9, 2026
| // Match the default flipping behavior of the Chakra Menu and Popover components | ||
| // by automatically placing the menu above or below the control based on the available space. | ||
| menuPlacement: "auto", | ||
| unstyled: true, |
Owner
Author
There was a problem hiding this comment.
I added this prop also to match v6. I don't believe it does anything anyway, because this package uses all custom components, but it could prevent react-select from passing around unused styles. It doesn't hurt in either case.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements a change I've been meaning to make for a while. The
menuPlacementprop determines where the select menu is placed depending on available screen space:By default, the menu will always stay on the bottom (essentially meaning the prop defaults to
"bottom"). However, the default behavior for the Chakra menus and popovers is to flip to the top if there isn't enough vertical space.So I finally decided to make the executive decision to default this prop to
"auto"to reflect that behavior, after having set it manually in so many of my own projects. This is actually already the case inchakra-react-select@6, but I wanted to update v5 to match. Here's what the behavior looks like:Screen.Recording.2026-01-09.at.5.21.33.PM.mov
It is always possible to go back to the default behavior of react-select by passing the prop
menuPlacement="bottom", so this isn't really a breaking change.