This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 6e7085be61 fix(dagrun): copy bug (#36855)
6e7085be61 is described below
commit 6e7085be6173ebec5e4c52c1223309460c632748
Author: Muhammad Luqman <[email protected]>
AuthorDate: Sat Jan 20 14:07:26 2024 +0700
fix(dagrun): copy bug (#36855)
---
airflow/www/static/js/dag/details/dagRun/index.tsx | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/airflow/www/static/js/dag/details/dagRun/index.tsx
b/airflow/www/static/js/dag/details/dagRun/index.tsx
index ed9dce266f..2bbdc5cdb0 100644
--- a/airflow/www/static/js/dag/details/dagRun/index.tsx
+++ b/airflow/www/static/js/dag/details/dagRun/index.tsx
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-import React, { useRef } from "react";
+import React, { useEffect, useRef } from "react";
import {
Flex,
Box,
@@ -65,7 +65,12 @@ const DagRun = ({ runId }: Props) => {
const offsetTop = useOffsetTop(detailsRef);
const run = dagRuns.find((dr) => dr.runId === runId);
- const { onCopy, hasCopied } = useClipboard(formatConf(run?.conf));
+ const { onCopy, setValue, hasCopied } = useClipboard(formatConf(run?.conf));
+
+ useEffect(() => {
+ setValue(formatConf(run?.conf));
+ }, [run, setValue]);
+
if (!run) return null;
const {
state,