Skip to content

Commit 6e7e67c

Browse files
committed
fix: fix filtered data list is empty on empty filter
restore original data on empty filter using originaldata attribute
1 parent d8a0e88 commit 6e7e67c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

projects/mat-advanced-table/src/lib/mat-advanced-table.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export class MatAdvancedTableComponent
169169

170170
applyFilter(filterValue: string) {
171171
if ((filterValue || "") === "" || (filterValue || "") === undefined) {
172-
this.dataSource.filteredData = this.data;
172+
this.dataSource.filteredData = [...this._originalData];
173173
return;
174174
}
175175
this.dataSource.filterPredicate = (object, filter) => {

0 commit comments

Comments
 (0)