I got this this hierarchy of component. A parent component who got 2 child components. I want the first child component to update a property of the parent component, after that the second child component re render. I got main component with two child components: one with select html input and the second one a table of data, the data is coming from the main component as an input. The idea is when i change the selected value, i want to change the data in the main component so the data table can get the new data from the main component. How can i do that?
In the first child:
@Output() optionSelected = new EventEmitter<string>();
@Input() data;
In the parent:
@Input() displayOption: string;
@Output() dataToSelect
When the displayOption updated , i want the second child re render
@Input
and@Output
decorators. – Yashwardhan Pauranik