Skip to content
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

Filtering by notEquals raises "TypeError: Cannot read property 'equals' of undefined" #3388

Closed
alex-dev opened this issue Jul 13, 2017 · 3 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@alex-dev
Copy link
Contributor

alex-dev commented Jul 13, 2017

[x ] bug report
[ ] feature request
[ ] support request

Plunkr Case (Bug Reports)
http://plnkr.co/edit/ko1TUjDqwi98UtnMx7Tt

Current behavior
It is impossible to filter with filterMatchMode set to notEquals. Trying just raise an error due to trying to access equals of an undefined this.

Expected behavior
Filter the data table and show only rows not matching the value.

Minimal reproduction of the problem with instructions
Choose a value from the dropdown and look at the console.

  • Angular version: 4.1.3

  • PrimeNG version: 4.1.0

@alex-dev
Copy link
Contributor Author

Just made a PR fixing the problem in the simplest way I could find.
#3389

@ctrl-brk
Copy link

From the docs: Default match mode is "startsWith" and this can be configured using filterMatchMode property of column object that also accepts "contains", "endsWith", "equals" and "in"
So, strongly speaking it's not a bug.

@alex-dev
Copy link
Contributor Author

alex-dev commented Jul 14, 2017

"Defines filterMatchMode; "startsWith", "contains", "endsWidth", "equals", "notEquals" and "in"."

And by me, a functionality in the code, not marked anywhere as non-functional, should work. Also, considering I fixed the bug and submitted a PR... The issue can be pretty much closed as soon as the PR is merged back.

@cagataycivici cagataycivici self-assigned this Jul 18, 2017
@cagataycivici cagataycivici added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Jul 18, 2017
@cagataycivici cagataycivici added this to the 4.1.1 milestone Jul 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

3 participants