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.
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 useRemoveData({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.