mui / mui/material-ui

Button Component value is not updated in case of conditional statement

Open
#36,912 6 comments 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

scope: stepper
Dominant language
JavaScript
Stars
99.1k
Forks
32.5k
Avg merge
2d 17h
Merged PRs (30d)
106

Description

Hi,

I have tried to use the example Stepper Component and realize that the value of the Button is not updated at the last step:

https://github.com/mui/material-ui/blob/05127cf65b4250f836897428cd15829669ab8d6c/docs/data/material/components/steppers/HorizontalLinearStepper.tsx#L109

I have tried other components like Box and Typography but they work as expected (update the value to the latest state). Tried to duplicate the Button Component but references to the same state value and it works only if the other Button is clicked. Can you please check, looks like the Button component misses the latest state update if it was initiated from its own onClick.

Thanks

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.