Slider not working as expected when disabled initially and enabled runtime

This was on the bug list as being fixed in 2.58.0, but I am using 4.30.2 and if I initially set the slider Disabled to true, enabling it results in the slider being frozen in place even though it appears to be enabled.

                    <RadzenSlider @bind-Value=@NonScalingStrokeWidth TValue="decimal" Min="0" Max="5" Step="0.1" Disabled="@IsNonScalingStrokeWidthDisabled" Change="@OnGapFillerSliderChange" />

Here is what I see on our demos using the latest version of Radzen.Blazor
slider

The bug is still there. With this code:

<div class="rz-p-12 rz-text-align-center">
    <RadzenCheckBox @bind-Value=_disabled />
    <RadzenSlider @bind-Value=@value TValue="int" Disabled=@_disabled />
</div>

@code {
int value = 33;
bool _disabled = true;
}

if you go ahead clicking on the checkbox, the slider disables correctly, but on the next check the slider looks enabled, but editing is blocked, and an error shows up in the console:

Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: ObjectDisposed_Generic
ObjectDisposed_ObjectName_Name, Microsoft.JSInterop.WebAssembly.WebAssemblyJSObjectReference
System.ObjectDisposedException: ObjectDisposed_Generic
ObjectDisposed_ObjectName_Name, Microsoft.JSInterop.WebAssembly.WebAssemblyJSObjectReference
at Microsoft.JSInterop.Implementation.JSObjectReference.ThrowIfDisposed()
at Microsoft.JSInterop.Implementation.JSObjectReference.InvokeAsync[IJSVoidResult](String , Object )
at Microsoft.JSInterop.JSObjectReferenceExtensions.InvokeVoidAsync(IJSObjectReference , String , Object )
at Radzen.Blazor.RadzenSlider`1.d__16[[System.Int32, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()

Thanks! Fix will be released immediately!

1 Like