From 58308d51eca0436dd8f0e6bb3d23c4ee4ed61fee Mon Sep 17 00:00:00 2001 From: Erki Aas Date: Tue, 15 Nov 2022 19:16:41 +0200 Subject: [PATCH] Improve ExamineLogModal - click to copy value --- src/components/Modal/ExamineLogModal.vue | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/components/Modal/ExamineLogModal.vue b/src/components/Modal/ExamineLogModal.vue index 54a5431..de66101 100644 --- a/src/components/Modal/ExamineLogModal.vue +++ b/src/components/Modal/ExamineLogModal.vue @@ -2,7 +2,7 @@ @@ -16,7 +16,8 @@ :enable-scrolling="true" :enableCellTextSelection="true" :ensureDomOrder="true" - > + @cell-clicked="copyText" + > Close @@ -78,6 +79,18 @@ export default { onGridReady(params) { params.api.sizeColumnsToFit() }, + close (e) { + if (e.target.className !== "ag-cell-value") { + this.closeModal() + } + }, + copyText(e) { + navigator.clipboard.writeText(e.value); + this.$toast.success(`Value copied to clipboard`, { + position: "top-right", + }); + setTimeout(this.$toast.clear, 3000); + } } }