[WEB-715] chore: closing custom dropdown on button click (#3950)
This commit is contained in:
parent
6bc133e3b1
commit
d25fcfdd88
1 changed files with 3 additions and 3 deletions
|
|
@ -114,7 +114,7 @@ const CustomMenu = (props: ICustomMenuDropdownProps) => {
|
||||||
type="button"
|
type="button"
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
openDropdown();
|
isOpen ? closeDropdown() : openDropdown();
|
||||||
if (menuButtonOnClick) menuButtonOnClick();
|
if (menuButtonOnClick) menuButtonOnClick();
|
||||||
}}
|
}}
|
||||||
className={customButtonClassName}
|
className={customButtonClassName}
|
||||||
|
|
@ -132,7 +132,7 @@ const CustomMenu = (props: ICustomMenuDropdownProps) => {
|
||||||
type="button"
|
type="button"
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
openDropdown();
|
isOpen ? closeDropdown() : openDropdown();
|
||||||
if (menuButtonOnClick) menuButtonOnClick();
|
if (menuButtonOnClick) menuButtonOnClick();
|
||||||
}}
|
}}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
|
|
@ -158,7 +158,7 @@ const CustomMenu = (props: ICustomMenuDropdownProps) => {
|
||||||
} ${buttonClassName}`}
|
} ${buttonClassName}`}
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
openDropdown();
|
isOpen ? closeDropdown() : openDropdown();
|
||||||
if (menuButtonOnClick) menuButtonOnClick();
|
if (menuButtonOnClick) menuButtonOnClick();
|
||||||
}}
|
}}
|
||||||
tabIndex={customButtonTabIndex}
|
tabIndex={customButtonTabIndex}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue