This post is from a low-reputation account and contains an unverified outbound link. Be cautious before clicking external links.

Material UI: Mobile Stepper with determinate progress bar

Words
83
Reading
1 min
Listen
Play
9y

Bug Fixes

  • What was the issue(s)?
    When using a mobile stepper with a determinate progress bar, it renders the indeterminate version instead of the determinate.
    This is how currently the determinate version renders incorectly:
    image.png

Code for this example:

<MobileStepper
  variant="progress"
  steps={6}
  position="static"
  activeStep={1}
  backButton={<div style={{ width: 64, height: 38 }} />}
  nextButton={<div style={{ width: 64, height: 38 }} />}
/>
  • What was the solution?

Fix the regression by changing the mode prop to variant. This aligned the component with some previous refactoring in material-ui components.
This is how the correct version looks after the fix.
image.png

Original Pull Request: https://github.com/mui-org/material-ui/pull/10190/files



Posted on Utopian.io - Rewarding Open Source Contributors

Material UI: Mobile Stepper with determinate progress bar | Ecency