Declined
Last Updated: 23 Aug 2024 11:55 by ADMIN
Created by: Felix Bohn
Comments: 3
Category: Stepper
Type: Bug Report
0

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