Closed arinef closed 5 years ago
This was one of the harder issues to solve... simply because it was kind of tricky to reproduce.
It happened because when a document gets deleted from pouchDB, pouchDB will release an event that can be interpreted (by my implementation) that a document (which is a previous version, mostly a conflict) has been added. And my implementation, by design, can never distinguish between a truly new document and such case, unless, I write some sort of persistent list of deleted documents.
So documents kept being deleted then re-added.
In addition to this bug, I noticed few other shortcomings about my implementation, so I trashed the whole thing. And I wrote pouchx a re-usable implementation that will always keep pouchDB and mobx in sync. Using it, everything worked like it should.
Also, delayed input occurs in development build, build in production and you shouldn't see any delay.
Describe the bug I noticed the documents that I delete will come back after I "Reload" the page or logged out then log in again
To Reproduce Steps to reproduce the behavior:
You will notice the same record will appear again (but the older rev), The record will be deleted from "CouchDB", but it will not from local "PouchDB"
Screenshots Before Delete
After Delete
After Reload
Additional context Also, I felt some delay when I try to input very fast at the name field maybe it's due to syncing every character to remote DB, why don't we use a simple button to trigger the whole change one time like "save" button