Skip to content

Commit

Permalink
Merge pull request #3233 from marmelab/fix-use-list-params
Browse files Browse the repository at this point in the history
[RFR] Fix useListParams hook
  • Loading branch information
fzaninotto authored May 16, 2019
2 parents 69b6ea2 + e783332 commit 86cfda4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/ra-core/src/controller/useListParams.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
4 changes: 2 additions & 2 deletions packages/ra-core/src/controller/useListParams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -94,7 +94,7 @@ const useListParams = ({
},
perPage = 10,
debounce = 500,
}: Props): [Query, Actions] => {
}: Options): [Query, Actions] => {
const [displayedFilters, setDisplayedFilters] = useState({});
const dispatch = useDispatch();

Expand Down

0 comments on commit 86cfda4

Please sign in to comment.