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

Submenu close the contextmenu when click #47

Open
khoakomlem opened this issue Nov 3, 2023 · 0 comments
Open

Submenu close the contextmenu when click #47

khoakomlem opened this issue Nov 3, 2023 · 0 comments

Comments

@khoakomlem
Copy link

khoakomlem commented Nov 3, 2023

  • rctx-contextmenu version: 1.4.1
  • node version: v19.9.0
  • npm (or yarn) version: 1.22.19

Relevant code or config

<ContextMenu
  id='node-context-menu'
  onHide={() => {
    setPreventClose(true);
  }}
>
  <Submenu title='Sub Menu'>
    <ContextMenuItem preventClose={preventClose}>
      <input />
      <Button
        onClick={() => {
          setPreventClose(false);
        }}
      >
        Submit
      </Button>
    </ContextMenuItem>
    <ContextMenuItem>Sub Item 2</ContextMenuItem>
    <ContextMenuItem>Sub Item 3</ContextMenuItem>
  </Submenu>
  <ContextMenuItem preventClose>add tags</ContextMenuItem>
  <ContextMenuItem>Menu Item 2</ContextMenuItem>
  <ContextMenuItem>Menu Item 3</ContextMenuItem>
  <ContextMenuItem>Menu Item 4</ContextMenuItem>
</ContextMenu>

What you did:
Click on "Sub menu"
image

What happened:
It closes the context menu
Expected result:
Will not close the context menu

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