Skip to content

Commit

Permalink
fix(explorer): enable editing internal namespace tables (#3553)
Browse files Browse the repository at this point in the history
  • Loading branch information
karooolis authored Feb 4, 2025
1 parent f043309 commit 6bd1695
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/clean-crabs-pump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@latticexyz/explorer": patch
---

Tables under internal namespace are now editable.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
getSortedRowModel,
useReactTable,
} from "@tanstack/react-table";
import { internalNamespaces } from "../../../../../../common";
import { Button } from "../../../../../../components/ui/Button";
import { Input } from "../../../../../../components/ui/Input";
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "../../../../../../components/ui/Table";
Expand Down Expand Up @@ -67,10 +66,9 @@ export function TablesViewer({ table, query, isLiveQuery }: Props) {
},
sortingFn: (rowA, rowB, columnId) => typeSortingFn(rowA, rowB, columnId, type),
cell: ({ row }) => {
const namespace = table?.namespace;
const keySchema = getKeySchema(table);
const value = row.getValue(name);
if (!table || Object.keys(keySchema).includes(name) || internalNamespaces.includes(namespace)) {
if (!table || Object.keys(keySchema).includes(name)) {
return value;
}

Expand Down

0 comments on commit 6bd1695

Please sign in to comment.