You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on custom checkbox components that include a label, I've discovered that all fields have a label tag rendered when "fieldTypeHasLabel" returns true. I propose adding an additional check to this function to return false when the field's schema does not have a label property (or altering the v-if statement on the label.
// option 1: add the following to fieldTypeHasLabel(field)
if(isNil(field.label))
return false;
// option 2: alter the label v-if
label(v-if="field.label && fieldTypeHasLabel(field)", :for="getFieldID(field)", :class="field.labelClasses")
This requires the unit tests to be aware of this change as well.
I can submit a PR for this change if approved. Just need to know which option makes more sense.
The text was updated successfully, but these errors were encountered:
zoul0813
added a commit
to zoul0813/vue-form-generator
that referenced
this issue
Nov 15, 2017
* feature/347-no-empty-labels:
updated tests for modified label logic
don't render labels when no label text is provided, proposed option 1 from vue-generators#347
* master:
fix bower.json validation
updated tests for modified label logic
don't render labels when no label text is provided, proposed option 1 from vue-generators#347
While working on custom checkbox components that include a label, I've discovered that all fields have a label tag rendered when "fieldTypeHasLabel" returns true. I propose adding an additional check to this function to return false when the field's schema does not have a label property (or altering the v-if statement on the label.
This requires the unit tests to be aware of this change as well.
I can submit a PR for this change if approved. Just need to know which option makes more sense.
The text was updated successfully, but these errors were encountered: