Form: initialValues
Not Updating in Read-Only Fields
#7370
Labels
Status: Pending Review
Issue or pull request is being reviewed by Core Team
Milestone
Describe the bug
Description
When using the
Form
component, I often needinitialValues
that are fetched asynchronously from a backend. These values are initially empty until the data is loaded.With PrimeVue components like
InputText
, the computedinitialValues
work as expected, and the fields correctly update when the async data is loaded.However, when trying to display read-only information inside a
div
(or a similar non-input element), the computedinitialValues
do not update correctly. The async values never populate thediv
.Even when wrapping the
div
inside aFormField
, the issue persists.Reproduction
Here’s a minimal example demonstrating the issue:
Pull Request Link
No response
Reason for not contributing a PR
Other Reason
No response
Reproducer
https://stackblitz.com/edit/yucbttft-muied3vv?file=src%2FApp.vue
Environment
primevue 4.3.1
Vue version
3.5.13
PrimeVue version
4.3.1
Node version
No response
Browser(s)
No response
Steps to reproduce the behavior
initialValues
coming from an async fetch.InputText
correctly updates, but thediv
does not display the async-loaded value.div
in aFormField
the issue persists.Expected behavior
div
) should update and display async-loaded values frominitialValues
, just likeInputText
does.div
inside aFormField
should allow it to correctly bind toinitialValues
.The text was updated successfully, but these errors were encountered: