Next.js Discord

Discord Forum

dismissing toast does not dismiss popup radix ui

Unanswered
American Chinchilla posted this in #help-forum
Open in Discord
American ChinchillaOP
basically im using toasts from react-hot-toast lib and a popup from radix ui (styled by shadcn) whenever i click outside popup it closes and this is the result I expect but when i also display a toast with a dismiss button clicking on it dismisses the popup too how to make it not?

1 Reply

American ChinchillaOP
<button
        onClick={(e) => {
          e.stopPropagation();
          toast.remove(id);
        }}
      >
        <CloseIcon className="shrink-0" />
      </button>
i tried adding stopPropagation but didnt work