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 documentation about <BulkUpdateFormButton> and <InputSelectorForm> #9145

Merged
merged 2 commits into from
Aug 1, 2023

Conversation

adguernier
Copy link
Contributor

@adguernier adguernier commented Jul 31, 2023

BulkUpdateButton-InputSelectorForm.mp4
import * as React from 'react';
import {
    Admin,
    BooleanField,
    BooleanInput,
    Datagrid,
    DateField,
    DateInput,
    List,
    Resource,
    SimpleForm,
    TextField,
} from 'react-admin';
import { BulkUpdateFormButton } from '@react-admin/ra-form-layout';

import { dataProvider } from './dataProvider';
import { i18nProvider } from './i18nProvider';

export const App = () => (
    <Admin dataProvider={dataProvider} i18nProvider={i18nProvider}>
        <Resource name="posts" list={PostList} />
    </Admin>
);

const PostBulkUpdateButton = () => (
    <BulkUpdateFormButton>
        <SimpleForm>
            <DateInput source="published_at" />
            <BooleanInput source="is_public" />
        </SimpleForm>
    </BulkUpdateFormButton>
);

const PostList = () => (
    <List>
        <Datagrid bulkActionButtons={<PostBulkUpdateButton />}>
            <TextField source="id" />
            <TextField source="title" />
            <DateField source="published_at" />
            <BooleanField source="is_public" />
        </Datagrid>
    </List>
);

@adguernier adguernier added the RFR Ready For Review label Jul 31, 2023
@adguernier adguernier changed the title [Doc] add doc about <BulkUpdateFormButton> and <InputSelectorForm> [Doc] Add documentation about <BulkUpdateFormButton> and <InputSelectorForm> Jul 31, 2023
@fzaninotto fzaninotto merged commit 2ca98dd into master Aug 1, 2023
@fzaninotto fzaninotto deleted the doc-bulk-update-form-button branch August 1, 2023 10:49
@fzaninotto fzaninotto added this to the 4.12.4 milestone Aug 1, 2023
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.

2 participants