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

Forms : Select and MultiSelect filtering option trigger resolver even if not updated the modelValue #7193

Closed
1 of 4 tasks
cotufaloschiflones opened this issue Feb 5, 2025 · 2 comments

Comments

@cotufaloschiflones
Copy link

cotufaloschiflones commented Feb 5, 2025

Describe the bug

The filter method shouldnt create a 'undefined' field in the $form model, because this is the main reason why the resolver is triggering, because Form component is updating internally the $form object exposed through v-slot (creating inside form a formfield object with the key undefined, and the value of the filter input text) and thats what is triggering the validation on the rest of the fields, even if they are pristine.

Because of that, I'm not able to validate every field when changes (only that field and only when modelValue of that field changes) and validate all fields on submit...which is the behaviour what I want

Pull Request Link

No response

Reason for not contributing a PR

  • Lack of time
  • Unsure how to implement the fix/feature
  • Difficulty understanding the codebase
  • Other

Other Reason

No response

Reproducer

https://stackblitz.com/edit/nj47spp5-7rg17dtr?file=src%2FApp.vue

Environment

It happens in dev mode

Vue version

3.5.13

PrimeVue version

4.2.5

Node version

No response

Browser(s)

No response

Steps to reproduce the behavior

  1. Click on select "Choose a fruit"
  2. Once opened, click the filter input text and start to filtering (just need 1 char)

Then you will see as the 2 fields are shown as errored.

Expected behavior

I want to validate every field when changes (only that field and only when modelValue of that field changes) and validate all fields on submit too

@cotufaloschiflones cotufaloschiflones added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 5, 2025
@tugcekucukoglu tugcekucukoglu added Status: Pending Review Issue or pull request is being reviewed by Core Team and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Feb 6, 2025
@tugcekucukoglu tugcekucukoglu added this to the 4.3.1 milestone Feb 6, 2025
@github-project-automation github-project-automation bot moved this to Review in PrimeVue Feb 6, 2025
@cotufaloschiflones
Copy link
Author

Would be nice to check on checkboxes and InputNumber, they has similar behaviours making the validation unstable

@tugcekucukoglu tugcekucukoglu modified the milestones: 4.3.0, 4.3.1 Feb 24, 2025
@mertsincan mertsincan removed the Status: Pending Review Issue or pull request is being reviewed by Core Team label Feb 28, 2025
@mertsincan mertsincan removed this from PrimeVue Feb 28, 2025
@mertsincan
Copy link
Member

Fixed in 4.3.0

@mertsincan mertsincan removed this from the 4.3.2 milestone Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants