This is an automated email from the ASF dual-hosted git repository. jedcunningham pushed a commit to branch v2-8-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit a970d1af038a609de5dbe11bf77f0e45d9112edd Author: Akash Sharma <[email protected]> AuthorDate: Wed Jan 17 03:40:41 2024 +0530 fix copy-bug (#34904) Co-authored-by: adaverse <adaverse@Akash> (cherry picked from commit 3a48d0c47f439b684511e47340fd24cc3188c4e7) --- airflow/www/static/js/components/Clipboard.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/airflow/www/static/js/components/Clipboard.tsx b/airflow/www/static/js/components/Clipboard.tsx index 0e0a5d451b..11b2547c1e 100644 --- a/airflow/www/static/js/components/Clipboard.tsx +++ b/airflow/www/static/js/components/Clipboard.tsx @@ -17,7 +17,7 @@ * under the License. */ -import React from "react"; +import React, { useEffect } from "react"; import { Button, IconButton, @@ -43,9 +43,13 @@ export const ClipboardButton = forwardRef( }, ref ) => { - const { hasCopied, onCopy } = useClipboard(value); + const { setValue, hasCopied, onCopy } = useClipboard(value); const containerRef = useContainerRef(); + useEffect(() => { + setValue(value); + }, [value, setValue]); + const commonProps = { onClick: onCopy, variant,
