Comments (7)
It's probably because of idField
not configure properly (which is set to id
by default).
app.configure(reactive(RxJS, {listStrategy: 'smart', idField: '_id' }))
Should do it. I'll probably change and make it mandatory.
from feathers-reactive.
yes, now it works with idField configured.
from feathers-reactive.
I'll reopen this as a reminder to make idField
mandatory.
from feathers-reactive.
I just hit this problem (the result list became empty after removing an item), and setting idField
fixed it.
I don't suppose feathers-client can get the information about the id
field from the server somehow, where it's already been configured?
from feathers-reactive.
Not really without adding service introspection which is not trivial to secure properly. I'm still making the change to have the id field being mandatory and potentially throwing an error if an item does not have the id field.
from feathers-reactive.
I'm experiencing a similar issue but only if I alter the original query.
For example I have a list of items with a published / unpublished status so on first load it shows all published items. If at this point if I mark an item as unpublished the list correctly updates. However if I update the list to say display unpublished items then try to update an item to published I get the behaviour described above where the data is lost.
This is my initial subscription, where the query is a BehaviourSubject
getItems() {
this.serviceSub = this.query.mergeMap(query => this.mainService.find({ query: query }));
this.serviceSub.subscribe(resp => {
this.total = resp.total;
this.items = resp.data;
this.isLoading = false;
});
}
This itself works fine in terms of updating the results but any patch updates afterwards fail.
This is what my patch request looks like
unpublish(id:string, status: boolean) {
this.mainService.patch(id, {published: status});
}
from feathers-reactive.
Setting idField
is now mandatory in v0.5.0 thanks to #58
from feathers-reactive.
Related Issues (20)
- An in-range update of webpack is breaking the build 🚨 HOT 8
- Sequelize query with $like throws unknown operation $like error HOT 3
- An in-range update of webpack-cli is breaking the build 🚨 HOT 5
- An in-range update of @types/feathersjs__feathers is breaking the build 🚨 HOT 4
- An in-range update of babel-plugin-add-module-exports is breaking the build 🚨 HOT 2
- An in-range update of babel-loader is breaking the build 🚨 HOT 1
- `@feathersjs/adapter-commons` dependency
- Typings support for feathers-reactive HOT 3
- An in-range update of webpack is breaking the build 🚨 HOT 2
- How force subscribe to fetch agian HOT 4
- How to unsubscribe() ? HOT 2
- Dove Support HOT 7
- Allow to Re-fetch all data when using smart listStrategy
- Hook generating patched/updated event before created event generates doublons
- Cannot call addListener on the client service connection HOT 14
- Cannot use import statement outside a module on v0.10.0 HOT 4
- Adding watch() in Angular HOT 1
- Failure to import in v0.10 HOT 3
- Sort property not available on objects raises an error
- Error: Cannot find namespace 'sift'. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from feathers-reactive.