Skip to content

InputNumber: internal ModelValue not being tracked correctly when value changed by user #7622

Closed
@Magiczne

Description

@Magiczne

Describe the bug

InputNumber is incorrectly tracking its model value when not used with primevue forms.

Behavior was working before introducing primevue forms - we have determined that the first time bug has occured is primevue 4.2.0

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/primevue-4-vite-issue-template-asrpvjy3

Environment

Vite, nothing special, it is breaking everywhere

Vue version

3.5.13

PrimeVue version

4.3.3

Node version

22.13.0

Browser(s)

No response

Steps to reproduce the behavior

  1. Go to reproduction example
  2. Enter "2" into second input
  3. Observe how it correctly changes to 2.4 (set multiplier)
  4. Try to enter "2" again into second input
  5. Observe how it now stays with the number 2, because events on the InputNumber component are not being fired, model value inside component stays the same.

Expected behavior

In point 5 - everything should work as in point 3.
As said before it was working before PrimeVue 4.2.0

Additionaly I have included a unit test that should pass, but it is now not passing.

Metadata

Metadata

Labels

Type: BugIssue contains a bug related to a specific component. Something about the component is not working

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions