1-off error in MobileStepper #12388
Labels
component: stepper
This is the name of the generic UI component, not the React module!
new feature
New feature or request
Expected Behavior
Mobile stepper should show correct percentage of steps in progress bar
Current Behavior
Right now it's calculating the percentage complete based on (active step)/(total steps - 1) * 100. This gives weird results where the progress is 0 on first step, 33% on second, 66% on third and 100% on fourth. It should either show 0 on step 1 and 75% on last step, or (and probably preferred) 25% on first step and 100% on last step. So: (active step + 1) / (total steps) * 100
Steps to Reproduce
Look at the existing demo on the demos page, which has 6 steps. Actually count and at step 3 of 6 the stepper is not 50%.
Link: https://material-ui.com/demos/steppers/
Context
We show "Step [x]/[total]" on our mobile stepper and it looks very weird when it's step 2/4 and not 50%
Your Environment
The text was updated successfully, but these errors were encountered: