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 range selection tip for Datagrid rows #9384

Merged
merged 2 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions docs/Datagrid.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,21 @@ export default PostList;

## `bulkActionButtons`

Bulk action buttons appear when users select one or several rows, and affect all the selected records. This is useful for actions like mass deletion or mass edition.

<video controls autoplay playsinline muted loop>
<source src="./img/bulk-actions-toolbar.webm" type="video/webm"/>
slax57 marked this conversation as resolved.
Show resolved Hide resolved
<source src="./img/bulk-actions-toolbar.mp4" type="video/mp4"/>
Your browser does not support the video tag.
</video>

Bulk action buttons are buttons that affect several records at once, like mass deletion for instance. In the `<Datagrid>` component, the bulk actions toolbar appears when a user ticks the checkboxes in the first column of the table. The user can then choose a button from the bulk actions toolbar. By default, all Datagrids have a single bulk action button, the bulk delete button. You can add other bulk action buttons by passing a custom element as the `bulkActionButtons` prop of the `<Datagrid>` component:
Users can select a range of rows by pressing the shift key while clicking on a row checkbox.

<video controls autoplay playsinline muted loop>
<source src="./img/datagrid-select-range.mp4" type="video/mp4"/>
Your browser does not support the video tag.
</video>

By default, all Datagrids have a single bulk action button, the bulk delete button. You can add other bulk action buttons by passing a custom element as the `bulkActionButtons` prop of the `<Datagrid>` component:

```tsx
import { Button } from '@mui/material';
Expand Down
Binary file modified docs/img/bulk-actions-toolbar.mp4
Binary file not shown.
Binary file removed docs/img/bulk-actions-toolbar.webm
Binary file not shown.
Binary file added docs/img/datagrid-select-range.mp4
Binary file not shown.
Loading