You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`confirmContent`| Optional | React node | - | Lets you customize the content of the confirm dialog. Only used in `'pessimistic'` or `'optimistic'` mutation modes |
252
+
|`confirmTitle`| Optional |`string`| - | Lets you customize the title of the confirm dialog. Only used in `'pessimistic'` or `'optimistic'` mutation modes |
253
+
|`label`| Optional |`string`| 'ra.action.delete' | label or translation message to use |
254
+
|`icon`| Optional |`ReactElement`|`<DeleteIcon>`| iconElement, e.g. `<CommentIcon />`|
255
+
|`mutationMode`| Optional |`string`|`'undoable'`| Mutation mode (`'undoable'`, `'pessimistic'` or `'optimistic'`) |
**Tip:** If you choose the `'pessimistic'` or `'optimistic'` mutation mode, a confirm dialog will be displayed to the user before the mutation is executed.
259
+
260
+
### `<BulkUpdateButton>`
261
+
262
+
Partially updates the selected rows. To be used inside [the `<Datagrid bulkActionButtons>` prop](./Datagrid.md#bulkactionbuttons).
|`data`| Required |`object`| - | An object with the fields that need to be updated on the selected records |
293
+
|`confirmContent`| Optional | React node | - | Lets you customize the content of the confirm dialog. Only used in `'pessimistic'` or `'optimistic'` mutation modes |
294
+
|`confirmTitle`| Optional |`string`| - | Lets you customize the title of the confirm dialog. Only used in `'pessimistic'` or `'optimistic'` mutation modes |
295
+
|`icon`| Optional |`ReactElement`|`<ActionUpdate>`| An icon element |
296
+
|`label`| Optional |`string`| 'ra.action.update' | Label or translation message to use |
297
+
|`mutationMode`| Optional |`string`|`'undoable'`| Mutation mode (`'undoable'`, `'pessimistic'` or `'optimistic'`) |
**Tip:** If you choose the `'pessimistic'` or `'optimistic'` mutation mode, a confirm dialog will be displayed to the user before the mutation is executed.
**Tip**: React-admin provides three components that you can use in `bulkActionButtons`: `<BulkDeleteButton>`, `<BulkUpdateButton>`, and `<BulkExportButton>`.
176
+
**Tip**: React-admin provides three components that you can use in `bulkActionButtons`: [`<BulkDeleteButton>`](./Buttons.md#bulkdeletebutton), [`<BulkUpdateButton>`](./Buttons.md#bulkupdatebutton), and [`<BulkExportButton>`](./Buttons.md#bulkexportbutton).
177
177
178
178
**Tip**: You can also disable bulk actions altogether by passing `false` to the `bulkActionButtons` prop. In this case, the checkboxes column doesn't show up.
179
179
@@ -183,7 +183,7 @@ Bulk action button components can use the [`useListContext`](./useListContext.md
183
183
*`resource`: the currently displayed resource (eg `posts`, `comments`, etc.)
184
184
*`filterValues`: the filter values. This can be useful if you want to apply your action on all items matching the filter.
185
185
186
-
Here is an example of custom bulk action button, which sets the `views` property of all posts to `0` optimistically:
186
+
Here is an example of custom bulk action button, which sets the `views` property of all posts to `0`:
0 commit comments