HalitTalha / ng-material-extensions

Extended features for @angular/material components
Apache License 2.0
101 stars 52 forks source link

ERROR TypeError: Cannot read property 'hasOwnProperty' of null (mat-table-filter) #93

Closed vjdaccache closed 3 years ago

vjdaccache commented 3 years ago

I have null values in my database. If the user starts the search with a column having null I will get this error. I am working with Angular 7 so using mat-table-filter@1.2.5

core.js:15724 ERROR TypeError: Cannot read property 'hasOwnProperty' of null at MatTableFilterService.push../node_modules/mat-table-filter/fesm5/mat-table-filter.js.MatTableFilterService.filterPredicate (mat-table-filter.js:301) at MatTableFilterService.push../node_modules/mat-table-filter/fesm5/mat-table-filter.js.MatTableFilterService.filterPredicate (mat-table-filter.js:342) at MatTableDataSource.filterPredicate (mat-table-filter.js:561) at table.es5.js:700 at Array.filter () at MatTableDataSource.push../node_modules/@angular/material/esm5/table.es5.js.MatTableDataSource._filterData (table.es5.js:700) at MapSubscriber.project (table.es5.js:655) at MapSubscriber.push../node_modules/rxjs/_esm5/internal/operators/map.js.MapSubscriber._next (map.js:35) at MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next (Subscriber.js:53) at CombineLatestSubscriber.push../node_modules/rxjs/_esm5/internal/observable/combineLatest.js.CombineLatestSubscriber.notifyNext (combineLatest.js:83)

Mohit-Purbia commented 3 years ago

I am also facing the error while filtering data with the null values. I am working on angular 9 and using "mat-table-filter": "9.1.0", core.js:6210 ERROR TypeError: Cannot read property 'hasOwnProperty' of null at MatTableFilterService.filterPredicate (mat-table-filter.js:129) at MatTableFilterService.filterPredicate (mat-table-filter.js:161) at MatTableDataSource.filterPredicate (mat-table-filter.js:251) at table.js:700 at Array.filter () at MatTableDataSource._filterData (table.js:696) at MapSubscriber.project (table.js:659) at MapSubscriber._next (map.js:29) at MapSubscriber.next (Subscriber.js:49) at CombineLatestSubscriber.notifyNext (combineLatest.js:73)

laurentiubl commented 3 years ago

I have he same problem

HalitTalha commented 3 years ago

Fixed