You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Im getting used to this library now.. Thanks for creating this. But, I see that my observables are not fired when I remove data. Not sure if Im doing anything wrong here. AddData fires my observables (this.store.select), but the same doesn't fire when I use RemoveData or RemoveChildData.
Here's what Im trying to do:
Say I have the following data:
export class User {
id: number;
name: string;
tasks: Task[];
}
export class Task {
id: number;
name: string;
comments: Comment[];
}
export class Comment{
id: number;
text: string;
}
export const userSchema = new schema.Entity('users');
export const commentSchema = new schema.Entity('comments');
export const taskSchema = new schema.Entity('tasks', { comments: [commentSchema] });
Now, if I want to remove a task from the data and use RemoveChildData({id: "2", taskSchema, userSchema, parentId: "1" }), I can see that it removes the task and reference from the tasks property under users.
If I use RemoveData({id: "2", schema: taskSchema, removeChildren: {comments: 'comments'}}), I see that the task and the related comments are removed.
But in both cases, my this.store.select is not fired.
The text was updated successfully, but these errors were encountered:
Im getting used to this library now.. Thanks for creating this. But, I see that my observables are not fired when I remove data. Not sure if Im doing anything wrong here.
AddData
fires my observables (this.store.select
), but the same doesn't fire when I useRemoveData
orRemoveChildData
.Here's what Im trying to do:
Say I have the following data:
Once I use
AddData
, I get below normalized dataNow, if I want to remove a
task
from the data and useRemoveChildData({id: "2", taskSchema, userSchema, parentId: "1" })
, I can see that it removes the task and reference from thetasks
property underusers
.If I use
RemoveData({id: "2", schema: taskSchema, removeChildren: {comments: 'comments'}})
, I see that thetask
and the relatedcomments
are removed.But in both cases, my
this.store.select
is not fired.The text was updated successfully, but these errors were encountered: