primevue icon indicating copy to clipboard operation
primevue copied to clipboard

fix/InputNumber Fixes #7562 (change to initial value when delete last…

Open altpebush6 opened this issue 6 months ago • 1 comments

There was a bug related to the InputNumber field in PrimeVue where, when attempting to delete the entire value using backspace, the field would revert back to its initial value. This issue is also reported in the official repository and can be referenced here: #7562

The problem originates from the formDefaultValue watcher inside the BaseEditableHolder file, where newValue is directly assigned to d_value. This causes the initial value to be automatically rewritten into the input field right after the last character is deleted.

To resolve this issue, I’ve modified the watcher so that d_value is updated with newValue only if the form has not yet been initialized, d_value is not null/undefined/empty, and d_value !== newValue. With this change, the issue no longer occurs.

Since this bug significantly affects our usage in our project, we would greatly appreciate it if this fix could be included in the upcoming Milestone 4.3.5.

altpebush6 avatar May 29 '25 08:05 altpebush6

@tugcekucukoglu

altpebush6 avatar Jun 13 '25 08:06 altpebush6

Hi 👋

Thanks for the fix — this issue is currently blocking us in production. Do you have any idea when this PR might be merged or included in a release?

Appreciate the great work from the team 🙏

mo-masmoudi avatar Jun 30 '25 21:06 mo-masmoudi

Our entire production setup is also waiting for this merge. :) @mertsincan

MelihAltintas avatar Jul 08 '25 08:07 MelihAltintas