Closed eimajenthat closed 6 years ago
Hey @eimajenthat,
Yes the library is 2 way sync, but the problem which i've faced as well is dependent on the database configuration.
To throw the onChange event, CouchDB db when initialized need to be configured and you have to set a filter.
// 'projects' key -> Database Name, ex: couchdb.com/projects
projects: {
// PouchDB.sync Options
sync: {
push: {
// config for push
},
pull: {
filter: 'projects/by_user',
query_params: { "name": "sadi" }
}
}
I'm populating a series of form fields from
mapQueries
. The fields populate fine, and the computed fields I have which use them update automatically. But the VuePouchDB's onChange event never fires, and the change isn't persisted after refresh. Do I have to send the update to PouchDB myself (ie. one way sync)? Or is there possibly an error somewhere?