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

Dropdown: item clipped if positioned right of a Menu #1897

Closed
hubertguillemain opened this issue Jul 25, 2017 · 4 comments
Closed

Dropdown: item clipped if positioned right of a Menu #1897

hubertguillemain opened this issue Jul 25, 2017 · 4 comments

Comments

@hubertguillemain
Copy link

hubertguillemain commented Jul 25, 2017

Steps

Create a top menu bar with the last item being a dropdown and with position ="right".
Some of the downdown's items have a long content

Expected Result

The dropdown is displayed completely and not clipped when expanded

Actual Result

The dropdown items are clipped and not fully visible

Version

0.71.1

Testcase

https://codepen.io/youbi/pen/RZNWjz

@levithomason
Copy link
Member

levithomason commented Jul 29, 2017

The Dropdown currently does not support menu direction. PRs welcome.

The Fix

We need to add a direction prop to the Dropdown.Menu which simply adds the left className when direction='left'.

We then need to also add a direction prop to the Dropdown. The Dropdown would pass the direction value to the Dropdown.Menu when rendering it. The CSS will then open it on the correct side.

A Workaround

Adding an inline style to the Dropdown.Menu will get the results you need for now:
https://codepen.io/levithomason/pen/XaXjma

<Dropdown.Menu style={{ left: 'auto', right: 0 }}>

Note that in future versions we are considering deprecating the Dropdown sub component API. We would then have only props for defining the menu and items. This will only happen if we can support all features via props, but I wanted to make you aware.

@mprambadi
Copy link

is the ticket available can i contribute to this issue ?

@levithomason
Copy link
Member

@mprambadi I've not seen a PR for this yet. I think you're in the clear.

Dropdown PRs

@layershifter layershifter changed the title (issue): Dropdown item clipped if positioned right of a Menu Dropdown: item clipped if positioned right of a Menu Sep 23, 2017
@stale
Copy link

stale bot commented Feb 4, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.

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

No branches or pull requests

3 participants