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

handleoutside not triggering on clicking the sibbling child element it open the both the menu item at once #220

Closed
mani-89 opened this issue Dec 12, 2018 · 1 comment

Comments

@mani-89
Copy link

mani-89 commented Dec 12, 2018

here this is code in menu i have dropdown and portal with state is in dropdown and menu list as children for dropdown like sample

Menu code:

<Dropdown> **//portal with state in drop down**
     <Menulist>
           <Menuitem></Menuitem>
           <Menuitem></Menuitem>
     </Menulist>
</Dropdown>

drop down : code

<PortalWithState
                closeOnEsc={closeOnEsc}
                closeOnOutsideClick={closeOnOutsideClick}
                onOpen={this.onOpen}
                adjustPosition={this.adjustPosition}
                onClose={onClose}
                beforeClose={this.beforeClose}
                isOpened={isOpened}
            >
                {({ openPortal, closePortal, isOpen, portal }) => (

                    <React.Fragment>
                        <Target.type onClick={openPortal} {...target.props} />//target element onclick it opens menu list of items
                        {portal(children)}
                    </React.Fragment>
                )}
            </PortalWithState>
@mani-89 mani-89 closed this as completed Dec 12, 2018
@mani-89
Copy link
Author

mani-89 commented Dec 12, 2018

reference this issue #206

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

No branches or pull requests

1 participant