Skip to content

Commit d221b13

Browse files
doc: update docs for useUnselect, useUnselectAll
1 parent 3c3c493 commit d221b13

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

docs/useUnselect.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ title: "useUnselect"
55

66
# `useUnselect`
77

8-
This hook returns a function that unselects lines in the current `<DataTable>` that match an array of ids. Pass the name of the resource to the hook as argument.
8+
This hook returns a function that unselects lines in a `<DataTable>` that match an array of ids. Pass the name of the resource to the hook as the 1st argument.
9+
10+
The 2nd optional argument accepts `storeKey`. It should match with the `storeKey` used in `useListController`.
11+
12+
Returned function accepts boolean as the 2nd `fromAllStoreKeys` argument - if `true`, then it will unselect the records across all storeKeys used with this resource.
913

1014
```jsx
1115
import { useListContext, useUnselect } from 'react-admin';

docs/useUnselectAll.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ title: "useUnselectAll"
55

66
# `useUnselectAll`
77

8-
This hook returns a function that unselects all lines in the current `<DataTable>`. Pass the name of the resource as argument.
8+
This hook returns a function that unselects all lines in a `<DataTable>`. Pass the name of the resource as the 1st argument.
9+
10+
The 2nd optional argument accepts `storeKey`. It should match with the `storeKey` used in `useListController`.
11+
12+
Returned function accepts a boolean `fromAllStoreKeys` argument - if `true`, then it will unselect all records across all storeKeys used with this resource.
913

1014
```jsx
1115
import { useUnselectAll } from 'react-admin';

docs_headless/src/content/docs/useUnselect.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
title: "useUnselect"
33
---
44

5-
This hook returns a function that unselects lines in the current data table (see `<DataTableBase>`) that match an array of ids. Pass the name of the resource to the hook as argument.
5+
This hook returns a function that unselects lines in a data table (see `<DataTableBase>`) that match an array of ids. Pass the name of the resource to the hook as the 1st argument.
6+
7+
The 2nd optional argument accepts `storeKey`. It should match with the `storeKey` used in `useListController`.
8+
9+
Returned function accepts boolean as the 2nd `fromAllStoreKeys` argument - if `true`, then it will unselect the records across all storeKeys used with this resource.
610

711
```jsx
812
import { useListContext, useUnselect } from 'ra-core';

docs_headless/src/content/docs/useUnselectAll.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
title: "useUnselectAll"
33
---
44

5-
This hook returns a function that unselects all lines in the current data table (see `<DataTableBase>`). Pass the name of the resource as argument.
5+
This hook returns a function that unselects all lines in a data table (see `<DataTableBase>`). Pass the name of the resource as the 1st argument.
6+
7+
The 2nd optional argument accepts `storeKey`. It should match with the `storeKey` used in `useListController`.
8+
9+
Returned function accepts a boolean `fromAllStoreKeys` argument - if `true`, then it will unselect all records across all storeKeys used with this resource.
610

711
```jsx
812
import { useUnselectAll } from 'ra-core';

0 commit comments

Comments
 (0)