question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Select] Change popover position

See original GitHub issue
  • This is a v1.x issue.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

I want to disable the way the select displays the popover, with the selected item being on the select, popover moving weird, just want to disable it, and position the menu under the select permanently. I’ve been through Select’s files, couldn’t find it. if you can walk me through, I’ll do it myself and make a PR.

Current Behavior

The popover is moving according to the selected item and there is no disable option / reposition option.

Examples

I want the menu to be under the select. image

Context

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

111reactions
oliviertassinaricommented, Jul 21, 2018

Oh, it’s with the Select, let’s go one step deeper:

  • The Select is using the Menu: capture d ecran 2018-07-21 a 22 04 42
  • ♻️
      <Select
        MenuProps={{
          anchorOrigin: {
            vertical: "bottom",
            horizontal: "left"
          },
          transformOrigin: {
            vertical: "top",
            horizontal: "left"
          },
          getContentAnchorEl: null
        }}
      >

https://codesandbox.io/s/18l2042y97

16reactions
oliviertassinaricommented, Mar 4, 2019

@w3nda Following the documentation:

  • The Menu component is built on top of the Popover: capture d ecran 2018-07-21 a 22 00 18
  • The Popover can be positioned as you are expecting: capture d ecran 2018-07-21 a 22 01 16
  • Combining these two informations and fixing a warning, we can came up with:
        <Menu
          anchorOrigin={{
            vertical: "bottom",
            horizontal: "left"
          }}
          transformOrigin={{
            vertical: "top",
            horizontal: "left"
          }}
          getContentAnchorEl={null}

https://codesandbox.io/s/9l17k3qnk4

I hope that help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Select] Change popover position #12208 - mui/material-ui
The popover is moving according to the selected item and there is no disable option / reposition option. Examples. I want the menu...
Read more >
How to position a Bootstrap popover? - Stack Overflow
Ideally, I'd position it on the bottom and move the arrow with CSS (so the arrow is on the top-right of the popover)....
Read more >
Popover Positioning - Kendo UI for Angular - Telerik
The Popover allows you to adjust its position according to its anchor element. To change the position, use the position option to place...
Read more >
How to position a Bootstrap popover ? - GeeksforGeeks
This article describes how a popover can be positioned on the page. The popover attribute of Bootstrap can be used to make the...
Read more >
Bootstrap JS Popover Reference - W3Schools
Name Type Default Try it animation boolean true Try it container string, or the boolean false false Try it content string "" Try it
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found