-
-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dropdown causes navbar size to change #50
Comments
Yeah. I believe you can constrain the width of your Flex or box. |
@koolamusic Maybe I am not explaining correctly. But I want to constrain the height. Clicking on the dropdown toggle button causes the navbar size to increase vertically to fit the dropdown inside. But I want the dropdown to be rendered outside of the navbar even though the input element is inside it. |
Setting maxH in the box element causes the dropdown position to change (it renders over the input element). I want the dropdown to still be below the input. |
hmm... I think this is something that can be achieved with portals. I could be wrong though, but another workaround could be to use |
Yes, I was thinking about portals as well. But I was playing around with your code and I am not sure how to fix the position to be directly below the input component. Using a portal was causing the dropdown to go to the left corner below the navbar (I want it aligned directly below input) |
Wrap the example codesandbox autocomplete inside a nav. Like this.
Forked CodeSandbox
Now when the toggle button is clicked the dropdown causes navbar size to change. I would like the dropdown to go past the navbar. React Select seems to do this fine. Chakra's own Select component works fine as well.
Is there a way to get the desired behavior similar to React Select or Chakra's Select ?
The text was updated successfully, but these errors were encountered: