Skip to content

fix: should re-align correctly when resize window, close: #56 #58

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

Merged
merged 1 commit into from
Jun 15, 2017

Conversation

benjycui
Copy link
Member

@@ -27,9 +27,10 @@ class Popup extends Component {

onAlign = (popupDomNode, align) => {
const props = this.props;
const alignClassName = props.getClassNameFromAlign(props.align);
Copy link
Member Author

Choose a reason for hiding this comment

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

window resize 时触发的 onAlign,这时 props.align 根本没有更新过,所以以 props.getClassNameFromAlign(props.align) 作为参考是不合理的。

@benjycui
Copy link
Member Author

单测不好写。。

@afc163 afc163 merged commit 9d2040f into master Jun 15, 2017
@benjycui benjycui deleted the fix-realign branch June 15, 2017 09:22
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.

2 participants