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

[BUG] Unable to set constraints to datatable filter when filter-display is "menu" #2190

Closed
juanparati opened this issue Feb 18, 2022 · 2 comments
Labels
Resolution: Invalid Issue or pull request is not valid in the latest version vue2

Comments

@juanparati
Copy link

[X] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primevue/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=110

CodeSandbox Case (Bug Reports)
Open with Firefox:
https://codesandbox.io/embed/magical-joana-dm709q

Current behavior
In Firefox 97.0, the MatchMode doesn't change and the following error is raised in console:
Error in v-on handler: "TypeError: _filters[this.field].constraints is undefined"

In Chrome and Safari the MatchMode changes but the following error is raised:
Error in v-on handler: "TypeError: Cannot read properties of undefined (reading '0')"

Expected behavior
It should allot change the MatchMode without raise any error exactly like it happens when datatable "filterDisplay" property is equal to "row". In fact you can change the filterDisplay property to "row" in the CodeSandbox and you can see how the filter works perfectly.

Minimal reproduction of the problem with instructions

  1. Open CodeSandbox with Firefox (In Chrome is raising an error but allows to set a different MatchMode).
  2. Click on the "Name" filter
  3. Select a different MatchMode than "Equals"

Please tell us about your environment:

  • Firefox 97.0
  • Safari 15.3
  • Google Chrome 98.0.x
  • Vue version:
    2.6.11

  • PrimeVue version:
    2.9.0

  • Browser:

  • Firefox 97.0
  • Safari 15.3
  • Google Chrome 98.0.x
@colinbes
Copy link
Contributor

Hmm, I wonder if this is related to issue I posted yesterday as well: #2183

@tugcekucukoglu tugcekucukoglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working vue2 labels Mar 1, 2022
@tugcekucukoglu
Copy link
Member

Please check Multiple Constraints section in the documentation. It's not a valid usage for menu display.

@tugcekucukoglu tugcekucukoglu added Resolution: Invalid Issue or pull request is not valid in the latest version and removed Type: Bug Issue contains a bug related to a specific component. Something about the component is not working labels Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Invalid Issue or pull request is not valid in the latest version vue2
Projects
None yet
Development

No branches or pull requests

3 participants