Skip to content

Commit

Permalink
Corrected JDocs.
Browse files Browse the repository at this point in the history
  • Loading branch information
asvarcas committed Jan 17, 2020
1 parent d6d0e61 commit 8dd6506
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions packages/ra-core/src/controller/useFilterState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ interface UseFilterStateOptions {
debounceTime?: number;
}

/**
* @typedef UseFilterStateProps
* @property {Object} filter: The filter object.
* @property {setFilter} setFilter: Update the filter with the given string
*/
interface UseFilterStateProps {
filter: Filter;
setFilter: (v: string) => void;
Expand All @@ -19,19 +24,6 @@ interface UseFilterStateProps {
const defaultFilterToQuery = (v: string) => ({ q: v });
const emptyFilter = {};

/**
* @name setFilter
* @function
* @param {string} the value
*/

/**
* @typedef FilterProps
* @type {Object}
* @property {Object} filter: The filter object.
* @property {setFilter} setFilter: Update the filter with the given string
*/

/**
* Hooks to provide filter state and setFilter which update the query part of the filter
*
Expand Down Expand Up @@ -59,7 +51,7 @@ const emptyFilter = {};
* @param {Object} option.permanentFilter Permanent filter to be merged with the filter string. Defaults to {}.
* @param {number} option.debounceTime Time in ms between filter updates - used to debounce the search. Defaults to 500ms.
*
* @returns {FilterProps} The filter props
* @returns {UseFilterStateOptions} The filter props
*/
export default ({
filterToQuery = defaultFilterToQuery,
Expand Down

0 comments on commit 8dd6506

Please sign in to comment.