Nie znam się (nic a nic), ale się wypowiem.
Jeśli to jest jakoś zanurzone w ekosystemie dotnetu, bym szukał w typie nullowalnym. "int" taki nie jest, hipotetycznie "int?" by był - o ile tak da sie napisac w ASP
jesi jest jak myślę, puste / null / nic nie wartością typu int
W MudSelect T="int"
zamiast int
dałem int
? i było faktycznie puste, ale przy okazji wywaliło błąd:
warn: Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer[100]
Unhandled exception rendering component: Unable to set property 'IMudShadowSelect' on object of type 'MudBlazor.MudSelectItem`1[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]'. The error was: Unable to cast object of type 'MudBlazor.MudSelect`1[System.Nullable`1[System.Int32]]' to type 'MudBlazor.MudSelect`1[System.Int32]'.
System.InvalidOperationException: Unable to set property 'IMudShadowSelect' on object of type 'MudBlazor.MudSelectItem`1[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]'. The error was: Unable to cast object of type 'MudBlazor.MudSelect`1[System.Nullable`1[System.Int32]]' to type 'MudBlazor.MudSelect`1[System.Int32]'.
---> System.InvalidCastException: Unable to cast object of type 'MudBlazor.MudSelect`1[System.Nullable`1[System.Int32]]' to type 'MudBlazor.MudSelect`1[System.Int32]'.
at MudBlazor.MudSelectItem`1.set_IMudShadowSelect(IMudShadowSelect value)
at Microsoft.AspNetCore.Components.Reflection.PropertySetter.CallPropertySetter[TTarget,TValue](Action`2 setter, Object target, Object value)
at Microsoft.AspNetCore.Components.Reflection.ComponentProperties.<SetProperties>g__SetProperty|3_0(Object target, PropertySetter writer, String parameterName, Object value)
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Components.Reflection.ComponentProperties.<SetProperties>g__SetProperty|3_0(Object target, PropertySetter writer, String parameterName, Object value)
at Microsoft.AspNetCore.Components.Reflection.ComponentProperties.SetProperties(ParameterView& parameters, Object target)
at Microsoft.AspNetCore.Components.ComponentBase.SetParametersAsync(ParameterView parameters)
at Microsoft.AspNetCore.Components.Rendering.ComponentState.SupplyCombinedParameters(ParameterView directAndCascadingParameters)
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
Unhandled exception in circuit '1g-NOPin7VNNC-N6w24e_9wiJPKIf2nA1UehzlaQdLI'.
System.InvalidOperationException: Unable to set property 'IMudShadowSelect' on object of type 'MudBlazor.MudSelectItem`1[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]'. The error was: Unable to cast object of type 'MudBlazor.MudSelect`1[System.Nullable`1[System.Int32]]' to type 'MudBlazor.MudSelect`1[System.Int32]'.
---> System.InvalidCastException: Unable to cast object of type 'MudBlazor.MudSelect`1[System.Nullable`1[System.Int32]]' to type 'MudBlazor.MudSelect`1[System.Int32]'.
at MudBlazor.MudSelectItem`1.set_IMudShadowSelect(IMudShadowSelect value)
at Microsoft.AspNetCore.Components.Reflection.PropertySetter.CallPropertySetter[TTarget,TValue](Action`2 setter, Object target, Object value)
at Microsoft.AspNetCore.Components.Reflection.ComponentProperties.<SetProperties>g__SetProperty|3_0(Object target, PropertySetter writer, String parameterName, Object value)
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Components.Reflection.ComponentProperties.<SetProperties>g__SetProperty|3_0(Object target, PropertySetter writer, String parameterName, Object value)
at Microsoft.AspNetCore.Components.Reflection.ComponentProperties.SetProperties(ParameterView& parameters, Object target)
at Microsoft.AspNetCore.Components.ComponentBase.SetParametersAsync(ParameterView parameters)
at Microsoft.AspNetCore.Components.Rendering.ComponentState.SupplyCombinedParameters(ParameterView directAndCascadingParameters)
warn: Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer[100]