We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3600d48 commit 7620472Copy full SHA for 7620472
src/components/DsfrDataTable/DsfrDataTable.vue
@@ -139,6 +139,10 @@ function onPaginationOptionsChange () {
139
wholeSelection.value = false
140
selection.value.length = 0
141
}
142
+
143
+function copyToClipboard (text) {
144
+ navigator.clipboard.writeText(text)
145
+}
146
</script>
147
148
<template>
@@ -240,6 +244,9 @@ function onPaginationOptionsChange () {
240
244
<td
241
245
v-for="(cell, cellIdx) of row"
242
246
:key="typeof cell === 'object' ? cell[rowKey] : cell"
247
+ tabindex="0"
248
+ @keydown.ctrl.c="copyToClipboard(typeof cell === 'object' ? cell[rowKey] : cell)"
249
+ @keydown.meta.c="copyToClipboard(typeof cell === 'object' ? cell[rowKey] : cell)"
243
250
>
251
<slot
252
name="cell"
0 commit comments