Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Stepper] Expanded prop missing from typescript #19869

Closed
2 tasks done
countableSet opened this issue Feb 26, 2020 · 1 comment · Fixed by #19873
Closed
2 tasks done

[Stepper] Expanded prop missing from typescript #19869

countableSet opened this issue Feb 26, 2020 · 1 comment · Fixed by #19873
Labels
component: stepper This is the name of the generic UI component, not the React module! good first issue Great for first contributions. Enable to learn the contribution process. typescript

Comments

@countableSet
Copy link
Contributor

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

Looks like a new prop was added to the stepper component for expanding steps, however, looks like it's missing from the typescript definition.

caused by;
#19200
missing from ts definition;
https://github.com/mui-org/material-ui/blob/49e1adf94bfe383ce819dce121f910a5c47bafbf/packages/material-ui/src/Step/Step.d.ts

Expected Behavior 🤔

Should be able to override the expanded prop in typescript.

Steps to Reproduce 🕹

https://codesandbox.io/s/frosty-darkness-tgcqu

Steps:

  1. Create a stepper component
  2. Add a step
  3. Try to add prop expanded
  4. Doesn't find it

Context 🔦

Your Environment 🌎

Tech Version
Material-UI v4.9.4
React 16.9.11
Browser Firefox 72.0.2
TypeScript 3.7.2
@oliviertassinari oliviertassinari added good first issue Great for first contributions. Enable to learn the contribution process. typescript component: stepper This is the name of the generic UI component, not the React module! labels Feb 26, 2020
@oliviertassinari
Copy link
Member

oliviertassinari commented Feb 26, 2020

@countableSet Thanks for the report. What do you think of this patch?

git fetch https://github.com/FottyM/material-ui "patch-2"
diff --git a/packages/material-ui/src/Step/Step.d.ts b/packages/material-ui/src/Step/Step.d.ts
index 84ad12089..d60607b73 100644
--- a/packages/material-ui/src/Step/Step.d.ts
+++ b/packages/material-ui/src/Step/Step.d.ts
@@ -10,6 +10,7 @@ export interface StepProps
   completed?: boolean;
   connector?: React.ReactElement;
   disabled?: boolean;
+  expanded?: boolean;
   index?: number;
   last?: boolean;
   orientation?: Orientation;

Do you want to submit a pull request :)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: stepper This is the name of the generic UI component, not the React module! good first issue Great for first contributions. Enable to learn the contribution process. typescript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants