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
Copy file name to clipboardExpand all lines: docs_headless/src/content/docs/SoftDeleteDataProvider.md
+13-15Lines changed: 13 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ layout: default
3
3
title: "Soft Delete Setup"
4
4
---
5
5
6
-
The soft delete feature is an [Enterprise Edition add-on](https://react-admin-ee.marmelab.com/documentation/ra-soft-delete) that allows you to "delete" records without actually removing them from your database.
6
+
The soft delete feature is an [Enterprise Edition add-on](https://react-admin-ee.marmelab.com/documentation/ra-core-ee) that allows you to "delete" records without actually removing them from your database.
7
7
8
8
Use it to:
9
9
@@ -12,14 +12,12 @@ Use it to:
12
12
- Restore archived items individually or in bulk
13
13
- Track who deleted what and when
14
14
15
-
It provides drop-in replacements for DeleteButton and BulkDeleteButton.
16
-
17
15
## Installation
18
16
19
17
```bash
20
-
npm install --save @react-admin/ra-soft-delete
18
+
npm install --save @react-admin/ra-core-ee
21
19
# or
22
-
yarn add @react-admin/ra-soft-delete
20
+
yarn add @react-admin/ra-core-ee
23
21
```
24
22
25
23
You will need an active Enterprise Edition license to use this package. Please refer to the [Enterprise Edition documentation](https://react-admin-ee.marmelab.com) for more details.
@@ -28,8 +26,8 @@ You will need an active Enterprise Edition license to use this package. Please r
28
26
29
27
### Methods
30
28
31
-
`ra-soft-delete` relies on the `dataProvider` to soft-delete, restore or view deleted records.
32
-
In order to use the `ra-soft-delete`, you must add a few new methods to your data provider:
29
+
The Soft Delete features of `ra-core-ee` rely on the `dataProvider` to soft-delete, restore or view deleted records.
30
+
In order to use those features, you must add a few new methods to your data provider:
33
31
34
32
-`softDelete` performs the soft deletion of the provided record.
35
33
-`softDeleteMany` performs the soft deletion of the provided records.
**Tip**: `ra-soft-delete` automatically populates the `authorId` parameter using `authProvider.getIdentity()` if it is implemented. It will use the `id` field of the returned identity object. Otherwise this field will be left blank.
96
+
**Tip**: `ra-core-ee` automatically populates the `authorId` parameter using `authProvider.getIdentity()` if it is implemented. It will use the `id` field of the returned identity object. Otherwise this field will be left blank.
99
97
100
98
**Tip**: Deleted records are immutable, so you don't need to implement an `updateDeleted` method.
101
99
102
-
Once your provider has all soft-delete methods, pass it to the `<Admin>` component and you're ready to start using `ra-soft-delete`.
100
+
Once your provider has all soft-delete methods, pass it to the [`<CoreAdmin>`](./CoreAdmin.md) component and you're ready to start using the Soft Delete feature.
@@ -138,15 +136,15 @@ Here is an example of a deleted record:
138
136
139
137
### Builders
140
138
141
-
`ra-soft-delete` comes with two built-in implementations that will add soft delete capabilities to your data provider without any specific backend requirements. You can choose the one that best fits your needs:
139
+
`ra-core-ee` comes with two built-in implementations that will add soft delete capabilities to your data provider without any specific backend requirements. You can choose the one that best fits your needs:
142
140
143
141
-[`addSoftDeleteBasedOnResource`](./addSoftDeleteBasedOnResource.md) stores the deleted records for all resources in a single resource. This resource is named `deleted_records` by default.
144
142
145
143
With this builder, all deleted records disappear from their original resource when soft-deleted, and are recreated in the `deleted_records` resource.
@@ -201,7 +199,7 @@ Each data provider verb has its own hook so you can use them in custom component
201
199
202
200
## `createMany`
203
201
204
-
`ra-soft-delete` provides a default implementation of the `createMany` method that simply calls `create` multiple times. However, some data providers may be able to create multiple records at once, which can greatly improve performances.
202
+
`ra-core-ee` provides a default implementation of the `createMany` method that simply calls `create` multiple times. However, some data providers may be able to create multiple records at once, which can greatly improve performances.
0 commit comments