Merge branch 'develop' into feature/rowy-285-cms

This commit is contained in:
Sidney Alcantara
2022-02-14 13:10:55 +11:00
committed by GitHub
2 changed files with 10 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "rowy",
"version": "2.3.1",
"version": "2.3.2",
"homepage": "https://rowy.io",
"repository": {
"type": "git",

View File

@@ -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 havent 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) => {