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

PopoverProps are not passed down to Popover component #1835

Closed
discourseMonger opened this issue May 28, 2020 · 3 comments · Fixed by #1850
Closed

PopoverProps are not passed down to Popover component #1835

discourseMonger opened this issue May 28, 2020 · 3 comments · Fixed by #1850

Comments

@discourseMonger
Copy link

A GIF or MEME to give some spice of the internet

Environment

Tech Version
@material-ui/pickers v4.0.0-alpha.7
material-ui 4.9.13
TypeScript
React
Browser
Peer library

Steps to reproduce

  1. Try to pass PopoverProps to DatePicker component (like anchorOrigin or transformOrigin). For example, like this:
      <LocalizationProvider dateAdapter={DateFnsUtils}>
        <DatePicker
          label="Basic example"
          value={selectedDate}
          onChange={(date) => handleDateChange(date)}
          renderInput={(props) => <TextField {...props} />}
          PopoverProps={{
            anchorOrigin: {
              vertical: "top",
              horizontal: "right",
            },
            transformOrigin: {
              vertical: "top",
              horizontal: "right",
            }
          }}
        />
      </LocalizationProvider>

Expected behavior

Popover (ie DatePicker) should reposition based on passed anchorOrigin/transformOrigin props (vertical/bottom).

Actual behavior

Popover position does not change, On versions 3.x PopoverProps worked nicely with variant="inline". Am I missing something here?

Live example

@oliviertassinari
Copy link
Member

oliviertassinari commented May 28, 2020

@discourseMonger Thanks for the report, though, we will likely rename PopoverProps -> PopperProps.

@lamhungypl
Copy link

How to change ref of Popper to right button? i use KeyboardDatePicker

@oliviertassinari
Copy link
Member

@lamhungypl Wait for #1850 to be released.

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

Successfully merging a pull request may close this issue.

3 participants