Skip to content

Commit

Permalink
More JDocs corrections.
Browse files Browse the repository at this point in the history
  • Loading branch information
asvarcas committed Jan 17, 2020
1 parent 8dd6506 commit ea97251
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 9 additions & 15 deletions packages/ra-core/src/controller/usePaginationState.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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)
*
Expand Down

0 comments on commit ea97251

Please sign in to comment.