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

[Select] menu props not working on bottom positioned element #25821

Open
aleksander351 opened this issue Apr 17, 2021 · 4 comments
Open

[Select] menu props not working on bottom positioned element #25821

aleksander351 opened this issue Apr 17, 2021 · 4 comments
Labels
bug 🐛 Something doesn't work component: select This is the name of the generic UI component, not the React module!

Comments

@aleksander351
Copy link

  • [x ] The issue is present in the latest release.
  • [ x] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

We are setting the position of the menu popup below the select element with the following code. But this is not working if the element is positioned at the bottom of the page.
`

        <Select
           MenuProps={{
                anchorOrigin: {
                    vertical: 'bottom',
                    horizontal: 'left',
                },
                transformOrigin: {
                    vertical: 'top',
                    horizontal: 'left',
                },
                getContentAnchorEl: null,
            }}
            ...

`

select-position

Expected Behavior 🤔

Steps to Reproduce 🕹

Steps:

Context 🔦

Your Environment 🌎

`npx @material-ui/envinfo`
  Don't forget to mention which browser you used.
  Output from `npx @material-ui/envinfo` goes here.
@aleksander351 aleksander351 added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Apr 17, 2021
@oliviertassinari oliviertassinari added bug 🐛 Something doesn't work component: select This is the name of the generic UI component, not the React module! and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Apr 17, 2021
@oliviertassinari
Copy link
Member

I would propose the same solution as #23919 (comment)

@oliviertassinari oliviertassinari changed the title Select menu props not working on bottom positioned element [Select] menu props not working on bottom positioned element Apr 17, 2021
@aleksander351
Copy link
Author

aleksander351 commented Apr 19, 2021

First of all, I would close this Issue only if the specific problem is solved and not some similar issue on mobile devices. And I would definitely not close this issue, if the other issue is not resolved yet.

No matter what the material design spec says about select menu positioning, a select component should at least have the option to mimic a browsers native select functionality. Which is for bottom positioned select elements like the image below:

image

@aleksander351
Copy link
Author

Autocomplete component doesn't have this problem.

@Lucas-Henrique-Lopes-Costa

did you manage to solve?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: select This is the name of the generic UI component, not the React module!
Projects
None yet
Development

No branches or pull requests

3 participants