Stepper focused item doesn't change if value is changed programatically

1 Answer 283 Views
Stepper
David
Top achievements
Rank 1
Iron
Iron
Veteran
David asked on 08 Dec 2021, 02:57 AM

Hi,

We are using the Stepper as feedback to let a user know what stage of a process they are up to rather than an interactive element i.e. we have a Stepper with no onChange or onFocus, an array of items, and the value is set programatically when the user loads data.

const items: StepProps[] = [ ... ];
const currentStep = items.findIndex((i) => i.key === props.currentStep);

return <Stepper value={currentStep} items={items} />;

On initial page load the stepper renders correctly, however on page refresh if the step changes then the previous step icon is still focused (with a ring around the icon) and remains focused even if another step is clicked. Similar behaviour can be observed on the Display Modes demo on the telerik site https://www.telerik.com/kendo-react-ui/components/layout/stepper/display_modes/, if you remove the onChange handler for the Steps with icons Stepper and then change the value by clicking on a different stepper e.g. https://react-vbgv3y.stackblitz.io.

Please see attached for a screenshot. Is this intended behaviour? Is there any way to use the stepper without this focus behaviour given that in this use case it is for feedback only? Is there a different control that would be more suited for this purpose?

Kind regards,

David

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 08 Dec 2021, 01:11 PM

Hello, David,

Thank you for the details.

After testing we can confirm that this is indeed an issue that we had received before as a report, but with fewer details. I re-opened it as it is still reproducible:

https://github.com/telerik/kendo-react/issues/979

Currently, there is no workaround available, if one is found it will be added to the issue.

Additionally, I have added some Telerik points to your account for bringing this to our attention.

Apologies for the inconvenience this may have caused you.

Regards,
Stefan
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Stepper
Asked by
David
Top achievements
Rank 1
Iron
Iron
Veteran
Answers by
Stefan
Telerik team
Share this question
or