File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed
packages/ra-core/src/controller/list Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -11,9 +11,11 @@ import { Identifier } from '../../types';
1111 * const unselect = useUnselect('posts');
1212 * unselect([123, 456]);
1313 */
14- export const useUnselect = ( resource ?: string ) => {
14+ export const useUnselect = ( resource ?: string , storeKey ?: string ) => {
1515 const [ , { unselect } ] = useRecordSelection (
16- resource ? { resource } : { disableSyncWithStore : true }
16+ resource
17+ ? { resource, storeKey }
18+ : { disableSyncWithStore : true , storeKey }
1719 ) ;
1820 return useCallback (
1921 ( ids : Identifier [ ] , fromAllStoreKeys : boolean = false ) => {
Original file line number Diff line number Diff line change @@ -10,13 +10,7 @@ import { useRecordSelection } from './useRecordSelection';
1010 * const unselectAll = useUnselectAll('posts');
1111 * unselectAll();
1212 */
13- export const useUnselectAll = ( {
14- resource,
15- storeKey,
16- } : {
17- resource ?: string ;
18- storeKey ?: string ;
19- } ) => {
13+ export const useUnselectAll = ( resource ?: string , storeKey ?: string ) => {
2014 const [ , { clearSelection } ] = useRecordSelection (
2115 resource
2216 ? { resource, storeKey }
You can’t perform that action at this time.
0 commit comments