-
-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
value.toLowerCase is not a function #28
Comments
Could you provide more details? For example the data you are trying to filter. |
I am using the filter on a array of objects, where each user is an object, there are nested objects in users. |
okay, and what is your |
Oops :S it is a string . How should i use it then on an object? I am new to angular2 sorry. |
You need to make the filter similar to the object you want to filter. For example you want to filter users by their name: users: any[] = [{ name: 'John' }, { name: 'Jane' }, { name: 'Mario' }]; then your filter would be: userFilter: any = { name: '' }; |
Even with object i get the same error. Could you describe it a little better how it should be used. With an example where there are used more fields in *ngFor not just name, and using a table where users are shown in rows? |
That would be the same for more fields in the object users: any[] = [{ name: 'John', age: 25 }, { name: 'Jane', age: 26 }, { name: 'Mario', age: 25 }]; userFilter: any = { name: '', age: null }; |
Does that mean that i have to include in the filter object all the user object properies and set them to null? However thank you for helping |
No, what i wanted to say is - you just need to add fields that you want your array of objects to be filtered by. In that case i did an example when i would filter by |
No luck yet, here is my filter object |
@dearibujar did you try to put |
@VadimDez I tried with your sample data also, same error. I will provide you also with a mock of my data and the html. But is it maybe the latest angular version that is causing the problem? By the way , i am using angular/cli |
I deleted your pipe and installed it from the begining, now it is working. But thank you for taking time, have a nice day. |
This issue is present in the examples, on the first "object.num" input. |
I try to use your pipe on a table , and i get this error value.toLowerCase is not a function
The text was updated successfully, but these errors were encountered: