Skip to content

Commit

Permalink
recalculate menu placement on options length
Browse files Browse the repository at this point in the history
  • Loading branch information
ayuka-bg authored Dec 12, 2023
1 parent 06e3488 commit c3b87fd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/react-select/src/components/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ export const MenuPlacer = <
menuPosition,
menuShouldScrollIntoView,
theme,
options: { length: optionsLength },
} = props;

const { setPortalPlacement } = useContext(PortalPlacementContext) || {};
Expand Down Expand Up @@ -360,6 +361,7 @@ export const MenuPlacer = <
minMenuHeight,
setPortalPlacement,
controlHeight,
optionsLength,
]);

return children({
Expand Down

0 comments on commit c3b87fd

Please sign in to comment.