nextui-org / nextui

🚀 Beautiful, fast and modern React UI library.
https://nextui.org
MIT License
21.9k stars 1.52k forks source link

[BUG] - Modal closes immediately if opened from the Dropdown component #1632

Open Ihor997452 opened 1 year ago

Ihor997452 commented 1 year ago

NextUI Version

2.1.12

Describe the bug

Modal closes immediately if opened from the Dropdown component

Your Example Website or App

https://codesandbox.io/p/sandbox/twilight-moon-jfn36n

Steps to Reproduce the Bug or Issue

  1. Go To https://codesandbox.io/p/sandbox/twilight-moon-jfn36n.
  2. Click on avatar to open dropdown menu.
  3. Click on 'New Project'.

Expected behavior

Modal window is expected to be shown until discarded by user.

Screenshots or Videos

No response

Operating System Version

Linux

Browser

Firefox

baronha commented 1 year ago

same issue on Chrome

MeijinK commented 11 months ago

Hi, i'm having the same issue here. Did it get fixed ?

baronha commented 11 months ago

I'm also getting the same error

thebashpotato commented 10 months ago

Experiencing same issue, is anyone working on this, or know of any workarounds?

charandeep7 commented 9 months ago
<DropdownSection title="Theme" showDivider>
  <DropdownItem
    isReadOnly
    key="theme"
    startContent={<ThemeSwitcher />}
  />
</DropdownSection>

use isReadOnly property in Dropdownitem

rjhoppe commented 9 months ago

@charandeep7 That fixed it for me! Cheers, this was driving me crazy

MeijinK commented 8 months ago

@charandeep7 This causes the dropdown to stay opened. Did you happen to find something else please ?

charandeep7 commented 8 months ago

Try this approach. It's not specific for NextUI but let's hope it's work. Link

MeijinK commented 8 months ago

On it, thank you. I'll get in touch if it works.

LeinahI commented 1 month ago

Thanks @charandeep7 it worked