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

use wrapper instead of control #467

Closed
wants to merge 1 commit into from
Closed

Conversation

bezreyhan
Copy link

Our select components are designed so that the menu covers the control when the menu is open. This entails changing the css of .Select-menu-outer to have a top of 0px.

However, when we make that change the menu doesn't open. It flickers but remains closed. I noticed that the menu will close if the user clicks outside of the .Select-control. I'm not sure why, but if the menu covers the control, when the user clicks on the control to open the menu the event.target === Select.wrapper This means that the menu will never open because the event will always occur outside of the control since it is occurring in the wrapper.

@@ -187,10 +187,10 @@ var Select = React.createClass({
return;
}
var menuElem = React.findDOMNode(_this.refs.selectMenuContainer);
var controlElem = React.findDOMNode(_this.refs.control);
var wrapperElem = React.findDOMNode(_this.refs.control);

Choose a reason for hiding this comment

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

I have the same issue and your solution work for me. Just a small typo issue. I think you wanted to get reference to the _this.refs.wrapper instead of _this.refs.control

@RafLeszczynski
Copy link

BTW @bezreyhan do you know what is the timeline for merging this pull request?

@JedWatson
Copy link
Owner

Sorry this never got attended to. With the release of 1.0.0 I'm closing a lot of old PRs and Issues that either may be fixed / or won't be fixed given the major changes since.

Please re-open if you still want to address this in the latest version.

Thanks!

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

Successfully merging this pull request may close these issues.

3 participants