My mat table includes a filter that utilizes chips to sort by multiple criteria.
Upon my initial attempt to filter and save the criteria, I encountered an error called ExpressionChangedAfterItHasBeenCheckedError. The error message indicates a transition from undefined to a number.
I came across several threads suggesting that I need to modify how I initialize the table and load data into it. I implemented ngAfterContentChecked() with this.ref.detectChanges(); which eliminates the error but does not fix the incorrect behavior.
The process starts with ngOnInit where I retrieve the data from a service.
How can I achieve the desired functionality?
Please refer to the attached code!
Thank you!
DetentionValidation.component.ts
[Code for DetentionValidation.component.ts]
DetentionValidation.component.html
[Code for DetentionValidation.component.html]