Changes Marked as Pending After User Restores Original Value (updateGroup)
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- JavaScript
- Stars
- 3.3k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
Description:
When using an OData V4 model with two-way binding and an updateGroup, if a user changes a property and then manually sets it back to its original value, hasPendingChanges() still returns true. This results in unnecessary backend requests, even though there are no actual modifications left.
Steps to Reproduce:
- Configure an OData V4 Binding with an
updateGroup. - Bind (e.g., value of
Input) to an OData V4 model property using two-way binding. - Change the input’s value from the original (e.g.,
"ABC") to a new value (e.g.,"DEF"). - Change the input’s value back to the original value (
"ABC"). - Call
hasPendingChanges().
Expected Behavior:
- After restoring the original value,
hasPendingChanges()should returnfalse. - No unnecessary backend requests should occur if no effective changes remain.
Actual Behavior:
- After restoring the original value,
hasPendingChanges()returnstrue. - Unnecessary backend requests are triggered when submitting the
updateGroupchanges.
Impact:
- Causes redundant server requests and additional load.
- Confuses users and developers, suggesting data is still modified.
- Complicates the process of batching changes.
Environment:
- UI5 version: 1.120.8
- OData V4 Backend: RAP with CDS
Additional Notes:
- Manual handling or resetting changes is required as a workaround.
Requested Fix:
- Improve the internal change tracking for
updateGroupscenarios so that restoring a property to its original value is correctly recognized as no pending change. - Ensure
hasPendingChanges()accurately reflects actual modifications.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.