diff --git a/desktop/flipper-plugin/src/ui/data-table/PowerSearchTableContextMenu.tsx b/desktop/flipper-plugin/src/ui/data-table/PowerSearchTableContextMenu.tsx index 86e5f62a251..de67433ebfd 100644 --- a/desktop/flipper-plugin/src/ui/data-table/PowerSearchTableContextMenu.tsx +++ b/desktop/flipper-plugin/src/ui/data-table/PowerSearchTableContextMenu.tsx @@ -201,6 +201,15 @@ function defaultOnCopyRows( .join('\n')}`; } -function rowsToJson(items: T[]) { - return JSON.stringify(items.length > 1 ? items : items[0], null, 2); +function rowsToJson(items: any[]) { + return JSON.stringify( + items.length > 1 ? items : items[0], + function (_key, value) { + if (typeof value === 'bigint') { + return `${value.toString()}n`; + } + return value; + }, + 2, + ); } diff --git a/desktop/flipper-plugin/src/ui/data-table/TableContextMenu.tsx b/desktop/flipper-plugin/src/ui/data-table/TableContextMenu.tsx index 43db7d1a4f9..bdb02d6980d 100644 --- a/desktop/flipper-plugin/src/ui/data-table/TableContextMenu.tsx +++ b/desktop/flipper-plugin/src/ui/data-table/TableContextMenu.tsx @@ -293,6 +293,15 @@ function defaultOnCopyRows( .join('\n')}`; } -function rowsToJson(items: T[]) { - return JSON.stringify(items.length > 1 ? items : items[0], null, 2); +function rowsToJson(items: any[]) { + return JSON.stringify( + items.length > 1 ? items : items[0], + function (_key, value) { + if (typeof value === 'bigint') { + return `${value.toString()}n`; + } + return value; + }, + 2, + ); }