-
Notifications
You must be signed in to change notification settings - Fork 3
[Field] Adding the possibility to show or hide the label #125
base: master
Are you sure you want to change the base?
Conversation
|
||
if(typeof hasLabel != 'boolean') { | ||
throw new Error('The given props hasLabel should be a boolean'); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PropsType is good for that no ?
<div data-focus='field-value-container' className='mdl-cell mdl-cell--top mdl-cell--8-col'>{ValueComponent}</div> | ||
</div> | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You will be in conflict with Thomas with that
2510b31
to
a3f956c
Compare
@Ephrame are you ok with this ? |
a3f956c
to
09fa7ef
Compare
@Ephrame @TomGallon I'm was thinking with @TomGallon about a solution and we a agree with this : isRaw and displayLabel (props)Considering the issue, we have think about a solution even for the futur A fieldFor should have :
Problem : how raw do we want it ?Still meditating with you, I'm asking this question : how raw do we want it ? I've tested some cases |
09fa7ef
to
17908f0
Compare
So I've updated the field component for the case it's a list. What we have nowWe can now give 2 new props on the field's options when it's declared :
What was already therThere was a prop called |
b42610e
to
55c1b51
Compare
[Field] Adding the possibility to show or hide the label
Description
Adding the possibility to display or hide a field's label by giving a prop
hasLabel
which is a boolean type.It is, by default, set to
true
.