-
Notifications
You must be signed in to change notification settings - Fork 369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(core): support transforming config before model creation #1010
base: master
Are you sure you want to change the base?
feat(core): support transforming config before model creation #1010
Conversation
Codecov Report
@@ Coverage Diff @@
## development #1010 +/- ##
==============================================
- Coverage 91.62% 91.6% -0.02%
==============================================
Files 154 154
Lines 2293 2300 +7
Branches 236 237 +1
==============================================
+ Hits 2101 2107 +6
Misses 135 135
- Partials 57 58 +1
Continue to review full report at Codecov.
|
@ronnetzer Thank you very much for this PR! Please give a bit of time to review this. Thanks again |
also trying to improve coverage
@udos86 Tried really hard to improve the coverage but I have no idea why it doesn't work :( |
@udos86 any news? would love to see this PR merged :) |
Hi @ronnetzer |
This feature adds the ability to add an array of model JSON transform functions through an injectionToken.
usage:
Motivation behind this feature:
Imagine that the form config contains all the labels and text as a path to a translation key.
With this feature, I'm able to Inject an array of transform functions, the first translate all the keys and the second one add an asterisk to the label if the model has required validator.