Skip to content
This repository was archived by the owner on Jun 28, 2026. It is now read-only.

InputNumber cannot be cleared inside Form when initialValues are set #8364

Description

@hewok

Describe the bug

When using inside a

with an initialValue set, the input cannot be cleared by the user.
If the numeric value is deleted, the component automatically restores the initial value instead of allowing null or an empty state.

This behavior only occurs when initialValue is provided to the .
If initialValue is not set, can be cleared correctly.

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

Environment

User Agent
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36

Vue version

3.2.45

PrimeVue version

4.5.4

Node version

No response

Browser(s)

Vivaldi 7.7.3851.67 > based on Chromium 142.0.7444.267

Steps to reproduce the behavior

  1. Open the StackBlitz reproduction link.
  2. Verify the behavior of the two rendered forms

Expected behavior

should allow being emptied (set to null) even when the form is initialized with initialValue

Metadata

Metadata

Labels

Package: Formsname: @primevue/formsType: BugIssue contains a bug related to a specific component. Something about the component is not working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions