From f5f656d7e4958e387c86da3b8a7178b6e1992cd9 Mon Sep 17 00:00:00 2001 From: Marek Mihok Date: Fri, 18 Aug 2023 16:28:17 +0200 Subject: [PATCH] add TODO #2025 --- ui/src/copyable_text.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/src/copyable_text.tsx b/ui/src/copyable_text.tsx index 4ac8b748e5..f64e3d8c7c 100644 --- a/ui/src/copyable_text.tsx +++ b/ui/src/copyable_text.tsx @@ -105,6 +105,7 @@ export const ClipboardCopyButton = ({ value, anchorElement, showOnHoverOnly = fa React.useEffect(() => { if (!anchorElement) return if (portal) { + // TODO: Prevent multiple portals from being created, e.g. when showOnHoverOnly prop changes. ReactDOM.render( ReactDOM.createPortal(CopyButton, anchorElement), document.createElement('div')