I am using this code
With Angular Material 10 If you want to show a message when not data matches the filter, you can use the *matNoDataRow directive.
No data matching the filter