Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Fix copy cell content in sql editor (#18677)

Terry Sutton66f8f7400a90
diff --git a/studio/components/interfaces/SQLEditor/UtilityPanel/Results.tsx b/studio/components/interfaces/SQLEditor/UtilityPanel/Results.tsx
index 2d9ebb396ae..868a51757a1 100644
--- a/studio/components/interfaces/SQLEditor/UtilityPanel/Results.tsx
+++ b/studio/components/interfaces/SQLEditor/UtilityPanel/Results.tsx
@@ -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)