fix: prevent custom menu button from opening cycle/ module details page when closed. (#4025)
This commit is contained in:
parent
58a45c96c0
commit
23f77328d4
1 changed files with 2 additions and 0 deletions
|
|
@ -131,6 +131,7 @@ const CustomMenu = (props: ICustomMenuDropdownProps) => {
|
||||||
ref={setReferenceElement}
|
ref={setReferenceElement}
|
||||||
type="button"
|
type="button"
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
isOpen ? closeDropdown() : openDropdown();
|
isOpen ? closeDropdown() : openDropdown();
|
||||||
if (menuButtonOnClick) menuButtonOnClick();
|
if (menuButtonOnClick) menuButtonOnClick();
|
||||||
|
|
@ -157,6 +158,7 @@ const CustomMenu = (props: ICustomMenuDropdownProps) => {
|
||||||
: "cursor-pointer hover:bg-custom-background-80"
|
: "cursor-pointer hover:bg-custom-background-80"
|
||||||
} ${buttonClassName}`}
|
} ${buttonClassName}`}
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
isOpen ? closeDropdown() : openDropdown();
|
isOpen ? closeDropdown() : openDropdown();
|
||||||
if (menuButtonOnClick) menuButtonOnClick();
|
if (menuButtonOnClick) menuButtonOnClick();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue