Skip to content
This repository has been archived by the owner on Sep 1, 2020. It is now read-only.

Fix submenu bug (not register hide event) #145

Merged
merged 1 commit into from
Sep 7, 2017

Conversation

yanxi123-com
Copy link
Contributor

see #143

@vkbansal
Copy link
Owner

vkbansal commented Sep 7, 2017

Can you explain what your change does exactly? How does adding a listener fix the reported issue?

@yanxi123-com
Copy link
Contributor Author

When click on menu item in sub menu, MENU_HIDE event is fired. But the SubMenu component haven't register hideMenu() to the event. So the visible state is still true, witch will cause user can click multi times

hideMenu = () => {
    if (this.props.forceOpen) {
        this.props.forceClose();
    }
    this.setState({ visible: false, selectedItem: null });
}

@vkbansal
Copy link
Owner

vkbansal commented Sep 7, 2017

Oh got it. Thank for the fix!

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

Successfully merging this pull request may close these issues.

2 participants