Skip to content

Commit

Permalink
[stepper] Fixed key and prop type warnings. (mui#4799)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexhayes committed Nov 2, 2017
1 parent bee1414 commit a01a4cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Stepper/StepContent.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// @flow

import React from 'react';
import type { Element, ChildrenArray } from 'react';
import warning from 'warning';
import classNames from 'classnames';
import Collapse from '../transitions/Collapse';
Expand Down Expand Up @@ -47,7 +48,7 @@ export type Props = {
/**
* Step content
*/
children: Node,
children: ChildrenArray<Element> | Node,
/**
* @ignore
*/
Expand Down
5 changes: 4 additions & 1 deletion src/Stepper/Stepper.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ function Stepper(props: ProvidedProps & Props) {
}

return [
!alternativeLabel && connector && index > 0 && React.cloneElement(connector),
!alternativeLabel &&
connector &&
index > 0 &&
React.cloneElement(connector, { key: `connect-${index - 1}-to-${index}` }),
React.cloneElement(step, Object.assign(controlProps, step.props)),
];
});
Expand Down

0 comments on commit a01a4cf

Please sign in to comment.