Hi, I just came accross a bug in the TelerikStepper.
I try to create a custom version that switches to a custom success icon after a step is completed.
It contains the following codesnippets:
<TelerikStepper Linear="true" ValueChanged="@HandleValueChanged">
<StepperSteps>
@for (int i = 0; i < IsValidArray.Length; i++)
{
<StepperStep Valid="@IsValidArray[i]"></StepperStep>
}
</StepperSteps>
</TelerikStepper>
@code {
bool?[] IsValidArray = [null, null, null, null];
public void HandleValueChanged(int index)
{
for (int i = 0; i < IsValidArray.Length; i++)
{
IsValidArray[i] = index > i ? true : null;
}
}
}
Forward it works like expected:
When moving backwards it behaves strange:
Except if you are debugging (Visual Studio debugger), then everything works as expected:
Same thing can be achived when not debugging but clicking on the step a second time.
This can not be solved by adding the @key parameter as suggested in https://feedback.telerik.com/blazor/1659827-bug-in-the-telerikstepper-in-blazor from Hristian Stefanov!
Nevertheless, it turns out that the Task.Delay(1); seems to solve the Issue somehow.
Is this intended?