-
This is similar to #4872, I don't think it was ever answered fully. I have my menuPlacement set to auto, but I want to add styles to either the top or bottom of the menu depending on which side of the select it is rendered on. Is there a way to determine if the menu will render on top or bottom when menuPlacement is set to auto? |
Beta Was this translation helpful? Give feedback.
Answered by
manjushsh
Nov 18, 2023
Replies: 1 comment 1 reply
-
Hi @erdbom, yes we can detect it using combination of Example code:
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
erdbom
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @erdbom, yes we can detect it using combination of
menuPlacement or state.selectProps.menuPlacement
andplacement
props. as shown in image below.👉🏼 Code Sandbox link
Example code: