Skip to content

Commit b3923ab

Browse files
authored
Merge pull request #9384 from marmelab/doc-bulk-action-shift-select
[Doc] Add range selection tip for Datagrid rows
2 parents 1b2b556 + 28ebe58 commit b3923ab

4 files changed

+10
-2
lines changed

docs/Datagrid.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,21 @@ export default PostList;
136136

137137
## `bulkActionButtons`
138138

139+
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.
140+
139141
<video controls autoplay playsinline muted loop>
140-
<source src="./img/bulk-actions-toolbar.webm" type="video/webm"/>
141142
<source src="./img/bulk-actions-toolbar.mp4" type="video/mp4"/>
142143
Your browser does not support the video tag.
143144
</video>
144145

145-
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:
146+
Users can select a range of rows by pressing the shift key while clicking on a row checkbox.
147+
148+
<video controls autoplay playsinline muted loop>
149+
<source src="./img/datagrid-select-range.mp4" type="video/mp4"/>
150+
Your browser does not support the video tag.
151+
</video>
152+
153+
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:
146154

147155
```tsx
148156
import { Button } from '@mui/material';

docs/img/bulk-actions-toolbar.mp4

73.6 KB
Binary file not shown.

docs/img/bulk-actions-toolbar.webm

-160 KB
Binary file not shown.

docs/img/datagrid-select-range.mp4

150 KB
Binary file not shown.

0 commit comments

Comments
 (0)