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

[Doc] Add <AutoSave> documentation #8969

Merged
merged 3 commits into from
Jun 5, 2023
Merged

[Doc] Add <AutoSave> documentation #8969

merged 3 commits into from
Jun 5, 2023

Conversation

fzaninotto
Copy link
Member

@fzaninotto fzaninotto commented Jun 4, 2023

Capture d’écran 2023-06-04 à 18 02 13
import { AutoSave } from '@react-admin/ra-form-layout';
import { Edit, SimpleForm, TextInput, DateInput, SelectInput, Toolbar } from 'react-admin';

const AutoSaveToolbar = () => (
    <Toolbar>
        <AutoSave />
    </Toolbar>
);

const PersonEdit = () => (
    <Edit mutationMode="optimistic">
        <SimpleForm
            resetOptions={{ keepDirtyValues: true }}
            toolbar={AutoSaveToolbar}
        >
            <TextInput source="first_name" />
            <TextInput source="last_name" />
            <DateInput source="dob" />
            <SelectInput source="sex" choices={[
                { id: 'male', name: 'Male' },
                { id: 'female', name: 'Female' },
            ]}/>
        </SimpleForm>
    </Edit>
);
  • Add AutoSave Chapter
  • Mention AutoSave in Reference and sidebar navigation
  • Mention AutoSave in related chapters
  • (Bonus) Improve existing form documentation

Copy link
Contributor

@slax57 slax57 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What a titanic job! 👏
(and a never-ending review 😅 )

docs/AccordionForm.md Outdated Show resolved Hide resolved
docs/LongForm.md Outdated Show resolved Hide resolved
@fzaninotto
Copy link
Member Author

Review applied

@slax57 slax57 added this to the 4.11.2 milestone Jun 5, 2023
@slax57 slax57 merged commit 312867b into master Jun 5, 2023
5 checks passed
@slax57 slax57 deleted the doc-add-autosave branch June 5, 2023 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants