Skip to content

Commit 142be5b

Browse files
committed
Simplify
1 parent 5fa23b2 commit 142be5b

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

packages/ra-core/src/controller/useList.ts

+4-6
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,10 @@ export const useList = (props: UseListOptions): UseListValue => {
7373
const [finalItems, setFinalItems] = useSafeSetState<{
7474
data: RecordMap;
7575
ids: Identifier[];
76-
}>(() => {
77-
return {
78-
data: indexById(data),
79-
ids,
80-
};
81-
});
76+
}>(() => ({
77+
data: indexById(data),
78+
ids,
79+
}));
8280

8381
// pagination logic
8482
const { page, setPage, perPage, setPerPage } = usePaginationState({

0 commit comments

Comments
 (0)