You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had a component with RangeInput component and with Value and ValueChanged
<RangeInputTValue="int"Min="0"Max="100"Step="5"ValueChanged="OnValueChange"Value="brightness"/>@code{private int brightness =50;protectedoverrideasyncTaskOnInitializedAsync(){brightness=awaitscreenBrightnessManager.GetCurrentScreenBrightness()??brightness;isInitialized=true;}privateasyncTaskOnValueChange(intvalue){if(!isInitialized)return;// Handle it returns a exceptionawaitscreenBrightnessManager.SetScreenBrightness(value);brightness=value;}}
And it was giving me an error every time the component was rendered.
crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: Value cannot be null. (Parameter 'accessor')
System.ArgumentNullException: Value cannot be null. (Parameter 'accessor')
at System.ArgumentNullException.Throw(String paramName)
at System.ArgumentNullException.ThrowIfNull(Object argument, String paramName)
at Microsoft.AspNetCore.Components.Forms.FieldIdentifier.Create[Int32](Expression`1 accessor)
at BlazorBootstrap.RangeInput`1.<OnInitializedAsync>d__5[[System.Int32, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
I solved it by using the bind-value set and get. But it should be working the first way.
I had a component with
RangeInput
component and with Value and ValueChangedAnd it was giving me an error every time the component was rendered.
I solved it by using the bind-value set and get. But it should be working the first way.
The text was updated successfully, but these errors were encountered: