#component is not rerendering when @Input array:Array<someItem>

7 messages · Page 1 of 1 (latest)

waxen horizon
#

I have an input as an array

@ViewChild('ref') title!: ElementRef<HTMLHeadingElement>;
  @Input() children: TextElementChild[] = [];
  @Input() elementId: string = '';
  @Input() text: string = '';
  @Input() level: TextElement['level'] = 1;
  @Input() hasPlaceHolder: boolean = false;

so in the parent component of this one.. I am accessing the model to get the values of this child component. so if anything in the model changes -> this component should rerender.
The problem now is that this component is not rerendering when I change the value that's passed to the @Input children in the model
So how can I solve this stupid problem ?

upbeat bronze
#

Don't describe your code, post it. Post a complete minimal reproduction as a stackblitz, as explained in #how-to-get-help

waxen horizon
#

so you will probably get lost when browsing through it

keen pond
#

That's why it's called a complete minimal reproduction. It's supposed to showcase your problem, you're not supposed to just share your whole app.

waxen horizon
#

I am sorry, but this is a bit hard, because I have to copy paste the whole model and the model itself is too large

upbeat bronze
#

No, you don't. Create a minimal model allowing to reproduce the issue, a minimal parent component and a minimal child component.