I created this demonstration and I want to verify my understanding of the dynamics involved.
In this demo, whenever a checkbox is selected, it triggers a merge of observable checkbox events.
This trigger leads to the update of an array containing instances that determine whether columns in a material table should be hidden or displayed.
The component also includes a method that defines the columns for the material table:
getDisplayedColumns(): string[] {
return this.columnDefinitions.filter(cd => !cd.hide).map(cd => cd.def);
}
If I understand correctly, this method is called each time the user interface is updated. In other words, Angular Change Detection triggers its execution?