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

Using InputNumber in PrimeVue Forms creates an 'undefined' field in $form #7256

Open
2 of 4 tasks
simon-mettler opened this issue Feb 14, 2025 · 0 comments
Open
2 of 4 tasks
Labels
Status: Pending Review Issue or pull request is being reviewed by Core Team
Milestone

Comments

@simon-mettler
Copy link

Describe the bug

Using InputNumber in PrimeVue Forms creates an 'undefined' field in $form.

<Form v-slot="$form">
    <InputNumber name="amount" />
</Form>

results in $form:

{ 
"valid": true,
  "amount": {
    "value": 5,
    "touched": false,
    "dirty": false,
    "pristine": true,
    "valid": true,
    "invalid": false,
    "error": null,
    "errors": []
  },
  "undefined": {
    "touched": false,
    "dirty": false,
    "pristine": true,
    "valid": true,
    "invalid": false,
    "error": null,
    "errors": []
  }
}

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/6jthrvfk?file=src%2FApp.vue

Environment

MacOS and Firefox/Chrome

Vue version

3.5.13

PrimeVue version

4.2.5

Node version

22.12.0

Browser(s)

No response

Steps to reproduce the behavior

  1. Create a form using primevue forms.
  2. Add a InputNumber field.

Expected behavior

No undefined item in $form when using a InputNumber field. $form object should only represent fields in the form.

@simon-mettler simon-mettler 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 14, 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 20, 2025
@tugcekucukoglu tugcekucukoglu added this to the 4.3.1 milestone Feb 20, 2025
@github-project-automation github-project-automation bot moved this to Review in PrimeVue Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Pending Review Issue or pull request is being reviewed by Core Team
Projects
Status: Review
Development

No branches or pull requests

2 participants