Skip to content

Commit cf2bd53

Browse files
authored
feat: Update default menu placement to "auto" (#373)
1 parent 34e42b9 commit cf2bd53

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/use-chakra-select-props.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ const useChakraSelectProps = <
9494
isReadOnly: inputProps.readOnly,
9595
required: required ?? inputProps.required,
9696
menuIsOpen: realMenuIsOpen,
97+
// Match the default flipping behavior of the Chakra Menu and Popover components
98+
// by automatically placing the menu above or below the control based on the available space.
99+
menuPlacement: "auto",
100+
unstyled: true,
97101
...props,
98102
// aria-invalid can be passed to react-select, so we allow that to
99103
// override the `isInvalid` prop

0 commit comments

Comments
 (0)