Skip to content

Commit 158ed09

Browse files
authored
Merge pull request #9216 from marmelab/wizardform-progress-false
[Doc] WizardForm: document ability to pass `progress={false}`
2 parents ead74aa + cfcd84d commit 158ed09

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

docs/WizardForm.md

+24
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,30 @@ const PostCreate = () => (
221221

222222
Any additional props will be passed to the `<Progress>` component.
223223

224+
You can also hide the progress stepper completely by setting `progress` to `false`.
225+
226+
```tsx
227+
import React from 'react';
228+
import { Create, TextInput, required } from 'react-admin';
229+
import { WizardForm } from '@react-admin/ra-form-layout';
230+
231+
const PostCreate = () => (
232+
<Create>
233+
<WizardForm progress={false}>
234+
<WizardForm.Step label="First step">
235+
<TextInput source="title" validate={required()} />
236+
</WizardForm.Step>
237+
<WizardForm.Step label="Second step">
238+
<TextInput source="description" />
239+
</WizardForm.Step>
240+
<WizardForm.Step label="Third step">
241+
<TextInput source="fullDescription" validate={required()} />
242+
</WizardForm.Step>
243+
</WizardForm>
244+
</Create>
245+
);
246+
```
247+
224248
## `sanitizeEmptyValues`
225249

226250
In HTML, the value of empty form inputs is the empty string (`''`). React-admin inputs (like `<TextInput>`, `<NumberInput>`, etc.) automatically transform these empty values into `null`.

0 commit comments

Comments
 (0)