-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Select filter in forms (FormField): The filter input is also invalid when select is invalid. #7052
Comments
Hello, I can confirm this. This is also a bigger issue - for multi select fields inside a form or form field, every checkbox and filter input is added to the form state. This breaks the entire form, which is why the select components are not usable with forms |
Hello @david-rohrschneider thats true, I have post something similar here: #7158 The select on filter create a 'undefined' field in the $form model just to check things etc, 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 But anyways you still can remove the error style in the filter input with PT, like so:
|
@cotufaloschiflones does not solve my Problem, since the select field needs to be validated for emptyness and i need the on-blur validation. Im sure this can be solved since other open source frameworks offer this functionality already. I didnt chrck but there was a PR fixing this here already |
@david-rohrschneider I know, the answer is for @JoseAntonioNavasSolutia to avoid the input filter state get marked as invalid (visually). I was mentioning you because you were talking about the behaviour of select and filtering, because of that I post the answer, I just recently open an issue with this (#7193). But your problem is the same as mine (kind of), but we need primevue fix first how they are doing the filtering approach because it has some caveats or side effects |
@cotufaloschiflones i see, did you try it with latest PR? |
@david-rohrschneider no, do you have the link to this PR? Im using the last version of primevue anyway |
@cotufaloschiflones i thought its this one but its not relevant it seems |
Describe the bug
When the select field is invalid, the select filter is also invalid. Also if we filter the filter value is the value of $field.value


Pull Request Link
No response
Reason for not contributing a PR
Other Reason
No response
Reproducer
stackblitz don't work
Environment
Windows 11
Vue version
3.5.13
PrimeVue version
4.2.0
Node version
20.11.10
Browser(s)
Chrome
Steps to reproduce the behavior
.
Expected behavior
.
The text was updated successfully, but these errors were encountered: