From d4165731a9cee5b080f3afef21589cd817cbe5d2 Mon Sep 17 00:00:00 2001 From: Austin Turner Date: Sun, 8 Dec 2024 12:47:05 -0700 Subject: [PATCH] Fox copy cell to clipboard When refactoring the context menu, the column was not set correctly causing the incorrect cell value to be copied --- libs/ui/src/lib/data-table/DataTable.tsx | 2 +- libs/ui/src/lib/data-table/DataTree.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/ui/src/lib/data-table/DataTable.tsx b/libs/ui/src/lib/data-table/DataTable.tsx index 7a179733..af6d0d39 100644 --- a/libs/ui/src/lib/data-table/DataTable.tsx +++ b/libs/ui/src/lib/data-table/DataTable.tsx @@ -140,7 +140,7 @@ export const DataTable = forwardRef>( row: filteredRows[contextMenuProps.rowIdx] as T, rowIdx: contextMenuProps.rowIdx, rows: filteredRows as T[], - column: columns[contextMenuProps.rowIdx], + column: contextMenuProps.column, columns, }); handleCloseContextMenu(); diff --git a/libs/ui/src/lib/data-table/DataTree.tsx b/libs/ui/src/lib/data-table/DataTree.tsx index feb13e07..55703082 100644 --- a/libs/ui/src/lib/data-table/DataTree.tsx +++ b/libs/ui/src/lib/data-table/DataTree.tsx @@ -134,7 +134,7 @@ export const DataTree = forwardRef>( row: filteredRows[contextMenuProps.rowIdx] as T, rowIdx: contextMenuProps.rowIdx, rows: filteredRows as T[], - column: columns[contextMenuProps.rowIdx], + column: contextMenuProps.column, columns, }); handleCloseContextMenu();