Skip to content

Commit

Permalink
fix(dagrun): copy bug (#36855)
Browse files Browse the repository at this point in the history
(cherry picked from commit 6e7085b)
  • Loading branch information
im-perativa authored and jedcunningham committed Feb 9, 2024
1 parent 61367fc commit 8e45528
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions airflow/www/static/js/dag/details/dagRun/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 8e45528

Please sign in to comment.