Under Review
Last Updated: 08 Jun 2021 08:03 by ADMIN
Ryan
Created on: 07 Jun 2021 14:28
Type: Feature Request
0
Allow Switch component to have a title for use with the Tooltip component

Please allow the Switch component to accept a title prop so that the Tooltip component can be used with Switch. Switch doesn't really support long labels, or labels at all in some themes, so it would be nice to be able to use Tooltip component with Switch component.

1 comment
ADMIN
Stefan
Posted on: 08 Jun 2021 08:03

Hello, Ryan,

Currently, we can wrap the Switch inside a span element that has a title and this will show the Tooltip.

Another option is to use the component ref to attach any attribute that is needed using the:

https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttribute

In general, most of the attributes have to be attached programmatically because the component is constructed by many elements, and each of these elements can have many attributes. If we have to expose all of them, this will create a very large and difficult to navigate API.
Please let me know if there is an issue using any of these approaches?

Regards,
Stefan
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/.