Skip to content

Admin: Add context.mergeItem() to merge server values into forms - #442

Merged
lehni merged 1 commit into
mainfrom
feature/merge-item
Oct 19, 2026
Merged

lehni merged 1 commit into
mainfrom
feature/merge-item

Conversation

@lehni

@lehni lehni commented Oct 19, 2026

Copy link
Copy Markdown
Contributor
  • Merge only the given values as if loaded: deserialized with the whole item, lists and objects merged by id, defaults and computed values run again
  • Keep the user's edits of other values and the clean or dirty state
  • Merge into drafts, and in place into the parent's item for forms with mutate, like resetItem()
  • Use mergeItem() in the guide's polling example instead of Object.assign()

@lehni
lehni force-pushed the feature/merge-item branch from c6114aa to 8f4f099 Compare October 19, 2026 13:34
- Merge only the given values as if loaded: deserialized with the whole item, lists and objects merged by id, defaults and computed values run again
- Keep the user's edits of other values and the clean or dirty state
- Merge into drafts, and in place into the parent's item for forms with mutate, like resetItem()
- Use mergeItem() in the guide's polling example instead of Object.assign()
@lehni
lehni force-pushed the feature/merge-item branch from 8f4f099 to 67130bb Compare October 19, 2026 13:35
@lehni
lehni merged commit 7e7d20d into main Oct 19, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant