Skip to content

Commit 8702668

Browse files
authored
Merge pull request #207 from data-driven-forms/fix-wizard-demo
fixed wizard demo
2 parents 5628497 + 0132d31 commit 8702668

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

packages/react-renderer-demo/src/app/pages/component-example.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ const CodeEditor = dynamic(import('@docs/components/code-editor'), {
3434
ssr: false,
3535
});
3636

37+
const Summary = ({ title }) => <div>{ title }</div>;
38+
Summary.propTypes = {
39+
title: PropTypes.string.isRequired,
40+
};
41+
3742
// Text inputs are first, then all other actions are sorted by title
3843
const comparator = (a, b) => {
3944
if (a.component === 'input') {
@@ -125,21 +130,21 @@ class ComponentExample extends Component {
125130
formFieldsMapper: {
126131
...props.mappers.mui.formFieldsMapper,
127132
[componentTypes.WIZARD]: MuiWizard,
128-
summary: () => <div>Mui summary</div>,
133+
summary: Summary,
129134
},
130135
layoutMapper: props.mappers.mui.layoutMapper,
131136
},
132137
pf3: {
133138
formFieldsMapper: {
134139
...props.mappers.pf3.formFieldsMapper,
135-
summary: () => <div>Pf3 summary</div>,
140+
summary: Summary,
136141
},
137142
layoutMapper: props.mappers.pf3.layoutMapper,
138143
},
139144
pf4: {
140145
formFieldsMapper: {
141146
...props.mappers.pf4.formFieldsMapper,
142-
summary: () => <div>Pf4 summary</div>,
147+
summary: Summary,
143148
},
144149
layoutMapper: props.mappers.pf4.layoutMapper,
145150
},

packages/react-renderer-demo/src/app/src/components/missing-demo-fields/mui-wizard/mui-wizard.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,4 @@ class Wizard extends React.Component {
5858
}
5959
}
6060

61-
const WizardFunction = props => <Wizard { ...props }/>;
62-
63-
export default WizardFunction;
61+
export default Wizard;

0 commit comments

Comments
 (0)