From 34ef234c42c91a6bf9849df401e537872d63e0bb Mon Sep 17 00:00:00 2001 From: Cristhian Zanforlin Lousa <72977554+Cristhianzl@users.noreply.github.com> Date: Thu, 11 Jul 2024 18:47:00 -0300 Subject: [PATCH] fix: enable copy when dict is disabled (#2642) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✨ (dictAreaModal): add customizeCopy function to copy JSON to clipboard --- src/frontend/src/modals/dictAreaModal/index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/frontend/src/modals/dictAreaModal/index.tsx b/src/frontend/src/modals/dictAreaModal/index.tsx index ff9294d9c..cfb040c92 100644 --- a/src/frontend/src/modals/dictAreaModal/index.tsx +++ b/src/frontend/src/modals/dictAreaModal/index.tsx @@ -73,6 +73,9 @@ export default function DictAreaModal({ setMyValue(edit.src); }} src={cloneDeep(myValue)} + customizeCopy={(copy) => { + navigator.clipboard.writeText(JSON.stringify(copy)); + }} />