I would like to see icon support for the switch control. See the attached screen shot for the use case.
I set the Enabled parameter to false, but it didn't disable the input.
Wrap the Switch inside label HTML element and set Enabled to false. Switch will remain enabled. This problem occurs only when you wrap the Switch inside a label. If the Switch is wrapped in another HTML element, the Enabled parameter will work as expected.
----------ADMIN EDIT----------
In the meantime, there are two possible workarounds:
@if (isEnabled == false)
{
<style>
.switch {
pointer-events: none;
}
</style>
}
<label class="switch">
<TelerikSwitch @bind-Value="@isSelected" Enabled="@isEnabled" />
@( isSelected ? "Selected" : "Not selected" )
</label>
@code {
private bool isSelected { get; set; }
static bool isEnabled { get; set; } = false;
}