Skip to content

Commit 640b6dc

Browse files
committed
refactor(tables): reuse clipboard helper
1 parent ea62a43 commit 640b6dc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid

apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/table-grid.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import type React from 'react'
44
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react'
5-
import { cn, toast, useToast } from '@sim/emcn'
5+
import { cn, toast, useToast, writeTextToClipboard } from '@sim/emcn'
66
import { Loader, TableX } from '@sim/emcn/icons'
77
import { createLogger } from '@sim/logger'
88
import type { TableCellSelection } from '@sim/realtime-protocol/table-presence'
@@ -1748,7 +1748,7 @@ export function TableGrid({
17481748
function handleCopyRowId() {
17491749
const rowId = contextMenu.row?.id
17501750
if (!rowId) return
1751-
void navigator.clipboard.writeText(rowId).catch(() => {})
1751+
void writeTextToClipboard(rowId).catch(() => {})
17521752
}
17531753

17541754
const handleGoToReferenceTable = useCallback(

0 commit comments

Comments
 (0)