[WEB-715] chore: closing custom dropdown on button click (#3950)

This commit is contained in:
Ramesh Kumar Chandra 2024-03-15 17:25:57 +05:30 committed by GitHub
parent 6bc133e3b1
commit d25fcfdd88
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -114,7 +114,7 @@ const CustomMenu = (props: ICustomMenuDropdownProps) => {
type="button"
onClick={(e) => {
e.stopPropagation();
openDropdown();
isOpen ? closeDropdown() : openDropdown();
if (menuButtonOnClick) menuButtonOnClick();
}}
className={customButtonClassName}
@ -132,7 +132,7 @@ const CustomMenu = (props: ICustomMenuDropdownProps) => {
type="button"
onClick={(e) => {
e.stopPropagation();
openDropdown();
isOpen ? closeDropdown() : openDropdown();
if (menuButtonOnClick) menuButtonOnClick();
}}
disabled={disabled}
@ -158,7 +158,7 @@ const CustomMenu = (props: ICustomMenuDropdownProps) => {
} ${buttonClassName}`}
onClick={(e) => {
e.stopPropagation();
openDropdown();
isOpen ? closeDropdown() : openDropdown();
if (menuButtonOnClick) menuButtonOnClick();
}}
tabIndex={customButtonTabIndex}