-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
[Doc] Update Soft Delete documentation #10986
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise the new doc page is good!
- Restore archived items individually or in bulk | ||
- Track who deleted what and when | ||
|
||
It provides drop-in replacements for DeleteButton and BulkDeleteButton. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
erf, not really 😅 (in headless)
```bash | ||
npm install --save @react-admin/ra-soft-delete | ||
# or | ||
yarn add @react-admin/ra-soft-delete | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we encourage to install ra-core-ee
instead? 🤔
Once your provider has all soft-delete methods, pass it to the `<Admin>` component and you're ready to start using `ra-soft-delete`. | ||
|
||
```tsx | ||
// in src/App.tsx | ||
import { Admin } from 'react-admin'; | ||
import { dataProvider } from './dataProvider'; | ||
|
||
const App = () => <Admin dataProvider={dataProvider}>{/* ... */}</Admin>; | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO we shouldn't be mentioning <Admin>
nor 'react-admin'
in this headless doc
|
||
```tsx | ||
// in src/dataProvider.ts | ||
import { addSoftDeleteBasedOnResource } from '@react-admin/ra-soft-delete'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please import from ra-core-ee instead (same below)
Problem
@react-admin/ra-soft-delete
has been updated and we also extracted all headless components and hooks to@react-admin/ra-core-ee
. The OSS documentation is out of date though.Solution
Update the OSS documentation, both standard and headless.
How To Test
make docker-doc
for standard documentationmake doc-headless
for headlessAdditional Checks
master
for a bugfix or a documentation fix, ornext
for a featureAlso, please make sure to read the contributing guidelines.