diff --git a/package.json b/package.json index e875f985..54fe2d19 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rowy", - "version": "2.3.1", + "version": "2.3.2", "homepage": "https://rowy.io", "repository": { "type": "git", diff --git a/src/hooks/useTable/useTableData.tsx b/src/hooks/useTable/useTableData.tsx index 602d65b7..e1e2b657 100644 --- a/src/hooks/useTable/useTableData.tsx +++ b/src/hooks/useTable/useTableData.tsx @@ -35,6 +35,7 @@ const rowsReducer = (prevRows: any, update: any) => { switch (update.type) { case "onSnapshot": const snapshotDocs = update.docs; + console.log("onSnapshot", snapshotDocs); // Get rows that may not be part of the snapshot // Rows with missing required fields haven’t been written to the db yet @@ -167,13 +168,14 @@ const useTableData = () => { const unsubscribe = query.limit(limit).onSnapshot( (snapshot) => { - if (snapshot.docs.length > 0) { - rowsDispatch({ - type: "onSnapshot", - docs: snapshot.docs, - // changes: snapshot.docChanges(), - }); - } + console.log("snapshot", snapshot); + // if (snapshot.docs.length > 0) { + rowsDispatch({ + type: "onSnapshot", + docs: snapshot.docs, + // changes: snapshot.docChanges(), + }); + // } tableDispatch({ loading: false }); }, (error: any) => {