feat(meta): add option to display mandatory field hint#98
feat(meta): add option to display mandatory field hint#98EtienneDOYON merged 2 commits intomasterfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #98 +/- ##
==========================================
+ Coverage 74.48% 74.68% +0.19%
==========================================
Files 28 28
Lines 388 391 +3
Branches 123 125 +2
==========================================
+ Hits 289 292 +3
Misses 64 64
Partials 35 35 ☔ View full report in Codecov by Sentry. |
| formMeta: { | ||
| shouldDisplayRequiredHint: true, | ||
| }, |
There was a problem hiding this comment.
🎯 suggestion: should be the opposite to match maximum case like actual
| if (!validation || !validation?.required?.value) { | ||
| shouldDisplayRequiredHint = false; | ||
| } |
There was a problem hiding this comment.
🎯 suggestion: and the invert condition here. Should be false by default and set to true here
There was a problem hiding this comment.
The goal here is to force the boolean to be false if and only if the field is optionnal. If it is required, we want to use the default value.
42609a0 to
199ebe1
Compare
Description
Add the possibility for a given form to handle metas.
Add the meta
shouldDisplayRequiredHintthat conditions displaying a*next to a field's label, if that label is mandatory.Related Issue
None.
Checklist