Skip to content
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

Bug: Dropdown "up" not working #6724

Open
3 tasks done
nikischin opened this issue Nov 9, 2023 · 6 comments
Open
3 tasks done

Bug: Dropdown "up" not working #6724

nikischin opened this issue Nov 9, 2023 · 6 comments
Labels
docs Documentation related

Comments

@nikischin
Copy link

Prerequisites

Describe the bug

On the dropdown the prop drop='up' is not working and still opening the dropdown menu on the bottom of the dropdown button.

Expected behavior

The dropdown should be opened on top not bottom.

To Reproduce

See at official documentation, also not working there.

Reproducible Example

https://react-bootstrap.github.io/docs/components/dropdowns#drop-directions

Screenshots

image

What operating system(s) are you seeing the problem on?

macOS

What browser(s) are you seeing the problem on?

Safari

What version of React-Bootstrap are you using?

2.9.0

What version of Bootstrap are you using?

5.*

Additional context

No response

@nikischin nikischin added the bug label Nov 9, 2023
@nikischin nikischin changed the title Bug: Dropdown up not working Bug: Dropdown "up" not working Nov 9, 2023
@kyletsang
Copy link
Member

This is due to the example container not having enough space to do the positioning. If you were to add a large margin to the top, it will position at the top. We should fix this example.

@kyletsang kyletsang added docs Documentation related and removed bug labels Nov 10, 2023
@nikischin
Copy link
Author

This is due to the example container not having enough space to do the positioning. If you were to add a large margin to the top, it will position at the top. We should fix this example.

Thank you so much for your fast answer! This helped a lot!

@troytomasch
Copy link

Was looking into a fix for this. Adding a chunk of padding at the top seems like an ugly solution but it maintains the simplicity of the code. The other option seems to be spacing out the top and the bottom row a little more and including the drop="up" dropdowns only in the bottom row so they have the space to expand upward. However, this option would involve lengthening the code snippet. @kyletsang and @nikischin, would love to hear your thoughts on these ideas.

Also, there is a similar problem with the drop="end" dropdowns where they drop the wrong direction but putting them further up in the order should be an easy fix.

@nikischin
Copy link
Author

If you would be able to remove the overflow: hidden from the .playgroundContainer_TGbA, this would also solve the issue (or overrite it with another class providing overflow: visible), however, I don't know if this would be the easiest solution.

@sarathkumarsasi
Copy link

Hi @kyletsang, Can I work on this issue?

@kyletsang
Copy link
Member

@sarathkumarsasi sure go for it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation related
Projects
None yet
Development

No branches or pull requests

4 participants