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



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

1 comment
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.

Marin Bratanov
Progress Telerik
