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

[Popover] Doesn't reposition with anchorEl #7479

Merged
merged 1 commit into from
Jul 19, 2017

Conversation

quiaro
Copy link
Contributor

@quiaro quiaro commented Jul 19, 2017

Closes #5937

  • PR has tests / docs demo, and is linted.
  • Commit and PR titles begin with [ComponentName], and are in imperative form: "[Component] Fix leaky abstraction".
  • Description explains the issue / use-case resolved, and auto-closes the related issue(s) (http://tr.im/vFqem).

@@ -281,6 +295,17 @@ class Popover extends Component<DefaultProps, Props, void> {
}
};

handleResize = debounce(
() => {
const element: any = ReactDOM.findDOMNode(this.transitionEl);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would be the correct type to use?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

flow already know the type of ReactDOM.findDOMNode, no need to add it.

},
166,
{
leading: true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the last value with leading: true. Do we have it? I feels like we don't. https://sking7.github.io/articles/1248932487.html

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added that leading option to reduce the lag in updating the position of the popover. Would you like me remove it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, If I can choose, I would rather have the last event than the first one.

@@ -437,13 +462,15 @@ class Popover extends Component<DefaultProps, Props, void> {
role={role}
onRequestTimeout={this.handleRequestTimeout}
transitionAppear
ref={el => (this.transitionEl = el)}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we use the wording node on the rest of the codebase for a ref callback argument. Can we stick to that convention?

Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking care of the issue!

@quiaro
Copy link
Contributor Author

quiaro commented Jul 19, 2017

No problem. Changes done!

@oliviertassinari oliviertassinari added bug 🐛 Something doesn't work component: menu This is the name of the generic UI component, not the React module! v1 labels Jul 19, 2017
@oliviertassinari oliviertassinari merged commit ebcdeb8 into mui:v1-alpha Jul 19, 2017
@oliviertassinari
Copy link
Member

@quiaro First merged PR here 🎉

@quiaro quiaro deleted the popover-5937 branch July 19, 2017 22:24
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: menu This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants