forked from github/plane
fix: notification card snooze (#3598)
* fix: resolved event propagation issue with notification card snooze button * fix: resolved event propagation issue with notification card snooze button
This commit is contained in:
parent
e69fcd410c
commit
4a145f7a06
@ -105,7 +105,8 @@ const CustomMenu = (props: ICustomMenuDropdownProps) => {
|
|||||||
<button
|
<button
|
||||||
ref={setReferenceElement}
|
ref={setReferenceElement}
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => {
|
onClick={(e) => {
|
||||||
|
e.stopPropagation();
|
||||||
openDropdown();
|
openDropdown();
|
||||||
if (menuButtonOnClick) menuButtonOnClick();
|
if (menuButtonOnClick) menuButtonOnClick();
|
||||||
}}
|
}}
|
||||||
@ -121,7 +122,8 @@ const CustomMenu = (props: ICustomMenuDropdownProps) => {
|
|||||||
<button
|
<button
|
||||||
ref={setReferenceElement}
|
ref={setReferenceElement}
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => {
|
onClick={(e) => {
|
||||||
|
e.stopPropagation();
|
||||||
openDropdown();
|
openDropdown();
|
||||||
if (menuButtonOnClick) menuButtonOnClick();
|
if (menuButtonOnClick) menuButtonOnClick();
|
||||||
}}
|
}}
|
||||||
@ -145,7 +147,8 @@ const CustomMenu = (props: ICustomMenuDropdownProps) => {
|
|||||||
? "cursor-not-allowed text-custom-text-200"
|
? "cursor-not-allowed text-custom-text-200"
|
||||||
: "cursor-pointer hover:bg-custom-background-80"
|
: "cursor-pointer hover:bg-custom-background-80"
|
||||||
} ${buttonClassName}`}
|
} ${buttonClassName}`}
|
||||||
onClick={() => {
|
onClick={(e) => {
|
||||||
|
e.stopPropagation();
|
||||||
openDropdown();
|
openDropdown();
|
||||||
if (menuButtonOnClick) menuButtonOnClick();
|
if (menuButtonOnClick) menuButtonOnClick();
|
||||||
}}
|
}}
|
||||||
|
@ -208,9 +208,6 @@ export const NotificationCard: React.FC<NotificationCardProps> = (props) => {
|
|||||||
<Tooltip tooltipContent="Snooze">
|
<Tooltip tooltipContent="Snooze">
|
||||||
<CustomMenu
|
<CustomMenu
|
||||||
className="flex items-center"
|
className="flex items-center"
|
||||||
menuButtonOnClick={(e: { stopPropagation: () => void }) => {
|
|
||||||
e.stopPropagation();
|
|
||||||
}}
|
|
||||||
customButton={
|
customButton={
|
||||||
<div className="flex w-full items-center gap-x-2 rounded bg-custom-background-80 p-0.5 text-sm hover:bg-custom-background-100">
|
<div className="flex w-full items-center gap-x-2 rounded bg-custom-background-80 p-0.5 text-sm hover:bg-custom-background-100">
|
||||||
<Clock className="h-3.5 w-3.5 text-custom-text-300" />
|
<Clock className="h-3.5 w-3.5 text-custom-text-300" />
|
||||||
|
Loading…
Reference in New Issue
Block a user