Duplicated
Last Updated: 23 Aug 2024 11:57 by ADMIN
Felix Bohn
Created on: 23 Aug 2024 10:45
Category: UI for Blazor
Type: Bug Report
0
Bug in the TelerikStepper in Blazor

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?


Duplicated
This item is a duplicate of an already existing item. You can find the original item here:
1 comment
ADMIN
Hristian Stefanov
Posted on: 23 Aug 2024 11:57

Hi Felix,

I'm marking this as a duplicate of the original item. I covered your latest question there.

Regards,
Hristian Stefanov
Progress Telerik

Do you have a stake in the designеr-developer collaboration process? If so, take our survey to share your perspective and become part of this global research. You’ll be among the first to know once the results are out.
-> Start The State of Designer-Developer Collaboration Survey 2024