amplify-codegen-ui
amplify-codegen-ui copied to clipboard
feat: prioritize override values in initialValues
- feat: prioritize override values in initialValues
- chore(release): v3.0.0
Problem
Generated forms currently require manual editing to incorporate override values, which makes them less scalable and limits their out-of-the-box usability.
Solution
Implement a mechanism to pass override properties as default values for the form's modelFields or initialValues. This approach will enable most custom logic to be handled externally, enhancing the versatility and out-of-the-box usability of the generated forms.
Additional Notes
Links
Ticket
GitHub issue:
https://github.com/aws-amplify/amplify-codegen-ui/issues/1165
Verification
Manual tests
Automated tests
- [x] Unit tests added/updated
- [ ] E2E tests added/updated
- [ ] N/A - (provide a reason)
- [ ] deferred - (provide GitHub issue for tracking)
Housekeeping
- [x] No non-essential console logs
- [x] All new files contain license notice
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Closes #1165
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 93.87%. Comparing base (
8d8ecbe) to head (9d5d309).
Additional details and impacted files
@@ Coverage Diff @@
## main #1166 +/- ##
=======================================
Coverage 93.86% 93.87%
=======================================
Files 150 150
Lines 6114 6118 +4
Branches 1838 1841 +3
=======================================
+ Hits 5739 5743 +4
Misses 357 357
Partials 18 18
| Files | Coverage Δ | |
|---|---|---|
| ...react/lib/forms/form-renderer-helper/form-state.ts | 98.96% <100.00%> (+0.02%) |
:arrow_up: |
Continue to review full report in Codecov by Sentry.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 8d8ecbe...9d5d309. Read the comment docs.