mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 09:55:06 +03:00
Fix copy cell content in sql editor (#18677)
This commit is contained in:
1 parent
0e8c97b54a
commit
66f8f7400a
1 file changed
+3
-3
@@ -12,9 +12,9 @@ const Results = ({ id, rows }: { id: string; rows: readonly any[] }) => {
|
||||
const [cellPosition, setCellPosition] = useState<any>(undefined)
|
||||
|
||||
function onCopyCell() {
|
||||
if (columns && cellPosition) {
|
||||
const { idx, rowIdx } = cellPosition
|
||||
const colKey = columns[idx].key
|
||||
if (cellPosition) {
|
||||
const { rowIdx, column } = cellPosition
|
||||
const colKey = column.key
|
||||
const cellValue = rows[rowIdx]?.[colKey] ?? ''
|
||||
const value = formatClipboardValue(cellValue)
|
||||
copyToClipboard(value)
|
||||
|
||||
Reference in new issue
Block a user