Skip to content

Commit 6dd0dd0

Browse files
committed
Do not enhance onReset anymore in the demo template
1 parent 1963077 commit 6dd0dd0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/react-renderer-demo/src/app/src/doc-components/custom-buttons.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const schema = {
2323
};
2424

2525
const FormTemplate = ({ formFields, schema }) => {
26-
const { handleSubmit, onReset, onCancel, getState, reset } = useFormApi();
26+
const { handleSubmit, onReset, onCancel, getState } = useFormApi();
2727
const { submitting, valid, pristine } = getState();
2828

2929
return (
@@ -36,7 +36,7 @@ const FormTemplate = ({ formFields, schema }) => {
3636
<Button disabled={submitting || !valid} style={{ marginRight: 8 }} type="submit" color="primary" variant="contained">
3737
Submit
3838
</Button>
39-
<Button disabled={pristine} style={{ marginRight: 8 }} onClick={() => { onReset(); reset(); }} variant="contained">
39+
<Button disabled={pristine} style={{ marginRight: 8 }} onClick={onReset} variant="contained">
4040
Reset
4141
</Button>
4242
<Button variant="contained" onClick={onCancel}>Cancel</Button>

0 commit comments

Comments
 (0)