File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
packages/explorer/src/app/(explorer)/[chainName]/worlds/[worldAddress]/explore Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 88 TriangleAlertIcon ,
99} from "lucide-react" ;
1010import { parseAsJson , parseAsString , useQueryState } from "nuqs" ;
11+ import { keccak256 , toHex } from "viem" ;
1112import { useCallback , useMemo } from "react" ;
1213import { Table as TableType } from "@latticexyz/config" ;
1314import { getKeySchema } from "@latticexyz/protocol-parser/internal" ;
@@ -126,10 +127,10 @@ export function TablesViewer({ table, isLiveQuery }: Props) {
126127 } ,
127128 manualPagination : true ,
128129 pageCount : - 1 ,
129- getRowId : ( row , idx ) =>
130- ` ${ idx } - ${ Object . entries ( row )
131- . map ( ( [ key , value ] ) => `${ key } : ${ value } ` )
132- . join ( "-" ) } ` ,
130+ getRowId : ( row ) => {
131+ const values = Object . values ( row ) . join ( "-" ) ;
132+ return keccak256 ( toHex ( `${ query } - ${ values } ` ) ) ;
133+ } ,
133134 onSortingChange : setSorting ,
134135 onPaginationChange : handlePaginationChange ,
135136 getCoreRowModel : getCoreRowModel ( ) ,
You can’t perform that action at this time.
0 commit comments