Duplicated
Last Updated: 16 Dec 2020 08:34 by ADMIN
Srdjan
Created on: 16 Dec 2020 08:25
Category: UI for Blazor
Type: Feature Request
1
Checkbox Label Parmeter

Hi!

 

Is there a reason the label has to be defined separately from the label? We'd love a "Label" parameter to be specified in the TelerikCheckbox control directly instead of having to create a separate element

Duplicated
This item is a duplicate of an already existing item. You can find the original item here:
1 comment
ADMIN
Marin Bratanov
Posted on: 16 Dec 2020 08:34

Hello Srdjan,

The main reason is to allow for your layouts to define the label wherever and however they want to.

The second reason is that a label requires an id attribute on the input, or to wrap said input. The first could cause issues with duplicated IDs if we hardcode something, and if we generate a GUID you could not possibly attach your label because it is not predictable. Wrapping the checkbox in the label will limit the possible layouts.

That said, the following feature would probably expose a label component and it would probably work for the checkbox too: https://feedback.telerik.com/blazor/1447949-be-able-to-add-a-label-to-all-components-datepicker-datetimepicker. Thus, I am adding your Vote for that and marking this one as a duplicate. That thread also shows a few ideas on how you could create that yourself.

Regards,
Marin Bratanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.