From 6b46b8e023a9857962d4d228b024a5090e15eec1 Mon Sep 17 00:00:00 2001 From: Gildas Garcia Date: Thu, 16 May 2019 08:24:34 +0200 Subject: [PATCH 1/2] Fix test title --- packages/ra-core/src/controller/useListParams.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ra-core/src/controller/useListParams.spec.ts b/packages/ra-core/src/controller/useListParams.spec.ts index e44146a561..d78795df53 100644 --- a/packages/ra-core/src/controller/useListParams.spec.ts +++ b/packages/ra-core/src/controller/useListParams.spec.ts @@ -4,7 +4,7 @@ import { SORT_ASC, } from '../reducer/admin/resource/list/queryReducer'; -describe('ListController', () => { +describe('useListParams', () => { describe('getQuery', () => { it('Returns the values from the location first', () => { const query = getQuery({ From e7833321fd5455421a8e7cac0f72989154049540 Mon Sep 17 00:00:00 2001 From: Gildas Garcia Date: Thu, 16 May 2019 08:24:57 +0200 Subject: [PATCH 2/2] Rename hooks options interface to Options --- packages/ra-core/src/controller/useListParams.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/ra-core/src/controller/useListParams.ts b/packages/ra-core/src/controller/useListParams.ts index 75b1b21b1b..8de4a760df 100644 --- a/packages/ra-core/src/controller/useListParams.ts +++ b/packages/ra-core/src/controller/useListParams.ts @@ -20,7 +20,7 @@ import { Sort, ReduxState, Identifier, RecordMap } from '../types'; import removeEmpty from '../util/removeEmpty'; import removeKey from '../util/removeKey'; -interface Props { +interface Options { filterDefaultValues?: object; perPage?: number; sort?: Sort; @@ -94,7 +94,7 @@ const useListParams = ({ }, perPage = 10, debounce = 500, -}: Props): [Query, Actions] => { +}: Options): [Query, Actions] => { const [displayedFilters, setDisplayedFilters] = useState({}); const dispatch = useDispatch();