feat(core): support transforming config before model creation#1010
feat(core): support transforming config before model creation#1010ronnetzer wants to merge 5 commits intoudos86:masterfrom
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.