mirror of https://github.com/nocodb/nocodb
braks
2 years ago
4 changed files with 41 additions and 13 deletions
@ -0,0 +1,24 @@
|
||||
<script lang="ts" setup> |
||||
import { onBeforeUnmount, onMounted, ref, useSmartsheetStoreOrThrow } from '#imports' |
||||
|
||||
const { cellRefs } = useSmartsheetStoreOrThrow() |
||||
|
||||
const el = ref<HTMLTableDataCellElement>() |
||||
|
||||
onMounted(() => { |
||||
cellRefs.value.push(el.value!) |
||||
}) |
||||
|
||||
onBeforeUnmount(() => { |
||||
const index = cellRefs.value.indexOf(el.value!) |
||||
if (index > -1) { |
||||
cellRefs.value.splice(index, 1) |
||||
} |
||||
}) |
||||
</script> |
||||
|
||||
<template> |
||||
<td ref="el"> |
||||
<slot /> |
||||
</td> |
||||
</template> |
Loading…
Reference in new issue