mdbInput checkbox labeless

web
mobile

Topic: mdbInput checkbox labeless

digitalmanagerguru pro asked 3 months ago

On the input.vue you are using an label html for labeless checkbox, why?!

<label
      v-if="isThisCheckboxLabeless"
      :class="labelClasses"
      @click="focus"
      ref="label"
      :for="id"
    />

because I was now adding a label:

 <mdb-input
                        v-model="form.terms"
                        id="terms"
                        type="checkbox"
                    >
                        <label for="terms" class="form-check-label"><a :href="trans('label.terms.url')" target="_blank">{{ trans('label.terms.text') }}</a></label>
                    </mdb-input>

and there is now 2 labels rendered on the final html.

I don't see why the need of that label for labeless checkbox.

I'll bypass with some css the layout issue, but I would appreciate to know the reasons for that labeless and would be great if we could bypass it. Would be better if we set :label="false"

Best regards


Magdalena Dembna staff premium commented 3 months ago

Thank you for this remark. We are currently planning major refactors for our components and checkbox will be one of them - we will certainly take your suggestion under consideration. Best regards, Magdalena


Please insert min. 20 characters.
Status

Open

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: Vue
  • MDB Version: 6.7.0
  • Device: Desktop
  • Browser: Chrome
  • OS: Win.10
  • Provided sample code: No
  • Provided link: No
Tags