Skip to content

Commit af2865b

Browse files
authored
chore(explorer): hide deleted records on local explorer (#3631)
1 parent 8cdc57b commit af2865b

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

.changeset/four-lies-hug.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@latticexyz/explorer": patch
3+
---
4+
5+
Deleted records no longer appear in the table data viewer when using the SQLite indexer.

packages/explorer/src/app/(explorer)/[chainName]/worlds/[worldAddress]/explore/Explorer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export function Explorer() {
3131
if (table && (!query || prevSelectedTableId !== selectedTableId)) {
3232
const tableName = constructTableName(table, worldAddress as Hex, chainId);
3333
if (indexer.type === "sqlite") {
34-
setQuery(`SELECT * FROM "${tableName}";`);
34+
setQuery(`SELECT * FROM "${tableName}" WHERE __isDeleted = 0;`);
3535
} else {
3636
const columns = Object.keys(table.schema).map((column) => `"${column}"`);
3737
setQuery(`SELECT ${columns.join(", ")} FROM "${tableName}" LIMIT ${pageSize} OFFSET 0;`);

0 commit comments

Comments
 (0)