Hi!
I have a Parent Model that is shaped like
const parentSchema = new SimpleSchema({
children: {
type: [childSchema],
}});
and a child model that is shaped like
const childSchema = new SimpleSchema({
id: {
type: String,
regEx: SimpleSchema.RegEx.Id
},
foo: {
type: String
}});
I then have a Bootstrap modal that displays the Parent Objects and then has a list of its “children” and all the “foos”. I have a ReactiveVar that controls what parent Object is currently being controlled via a “next/prev” button. The navigating around Parents works just fine. However, I’m noticing that the array of children objects are not reactively changing. I.e. I can be on Parent 1 and switch to Parent 2 - but Parent 1’s children will still be showing.
I understand this is because embedded subdocuments are not inherently reactive. Also, the childSchema doesn’t exist as its own collection, so I cannot subscribe to a cursor for it either. What solutions exist for this? Thanks!