From ea97251d7daac3b774c1d9483ae8bc43c4b5cc15 Mon Sep 17 00:00:00 2001 From: asvarcas Date: Fri, 17 Jan 2020 11:25:52 -0300 Subject: [PATCH] More JDocs corrections. --- .../input/useReferenceArrayInputController.ts | 2 -- .../src/controller/usePaginationState.ts | 24 +++++++------------ 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/packages/ra-core/src/controller/input/useReferenceArrayInputController.ts b/packages/ra-core/src/controller/input/useReferenceArrayInputController.ts index 5c2e2792131..e8da163c4f3 100644 --- a/packages/ra-core/src/controller/input/useReferenceArrayInputController.ts +++ b/packages/ra-core/src/controller/input/useReferenceArrayInputController.ts @@ -23,9 +23,7 @@ import { getStatusForArrayInput as getDataStatus } from './referenceDataStatus'; * }); * * @param {Object} option - * @param {boolean} option.allowEmpty do we allow for no referenced record (default to false) * @param {string} option.basePath basepath to current resource - * @param {string | false} option.linkType The type of the link toward the referenced record. edit, show of false for no link (default to edit) * @param {Object} option.record The The current resource record * @param {string} option.reference The linked resource name * @param {string} option.resource The current resource name diff --git a/packages/ra-core/src/controller/usePaginationState.ts b/packages/ra-core/src/controller/usePaginationState.ts index 3952665d73f..6b81a04b7fd 100644 --- a/packages/ra-core/src/controller/usePaginationState.ts +++ b/packages/ra-core/src/controller/usePaginationState.ts @@ -1,6 +1,15 @@ import { useEffect, useReducer, useCallback, useRef } from 'react'; import { Pagination } from '../types'; +/** + * @typedef PaginationProps + * @type {Object} + * @property {number} page: The page number. + * @property {number} perPage: The number of item per page. + * @property {function} setPage: Set the page number + * @property {function} setPerPage: Set the per page number + * @property {function} setPagination: Set page and perPage pagination numbers + */ interface PaginationProps { page: number; perPage: number; @@ -25,21 +34,6 @@ const defaultPagination = { perPage: 25, }; -/** - * @name setNumber - * @function - * @param {number} state the state value - */ - -/** - * @typedef PaginationProps - * @type {Object} - * @property {number} page: The page number. - * @property {number} perPage: The number of item per page. - * @property {setNumber} setPage: Set the page number - * @property {setNumber} setPerPage: Set the per page number - */ - /** * Hooks to provide pagination state (apge and perPage) *