I posted a question about RadzenSlider here:
It's mostly out of curiosity as the issue is resolved (I used the "works" slider as described there).
Just curious as to what would cause the difference in behavior described there.
Thanks for Radzen Blazor!
I've been using it in a small demo application:
Not sure what can cause such behavior. Our demos are using exactly such syntax:
Thank you for taking a look.
I was able to solve the issue. Answer is here:
The reason why Action doesn't work while EventCallback does is that Blazor does some magic for the latter - calls StateHasChanged() implicitly after the callback code runs.
Ah, ok, that makes sense. Thank you for the explanation!
So, with the above sorted out, my app seems to be working. However, I received feedback from someone regarding the component implementation. They basically said it's a bad idea to change the component parameter from the setter.
Here's the full details regarding their critique:
Now, as far as I can tell, what they're saying not to do seems to be exactly how
RadzenSlider is implemented. I.e. the setter of
Value changes the parameter value:
From this I'm taking that perhaps its not so bad to do this after all?
Thanks for any suggestions or thoughts.
Value property of all Radzen form components including RadzenSlider is especially designed to support two-way binding (it has ValueChanged callback) and this is how every two way bindable property should work.
I've posted an answer there which doesn't use the parameter setter to change the value: