File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1380,7 +1380,7 @@ So the `RecordMap` type is no longer necessary and was removed. TypeScript compi
1380
1380
1381
1381
``` diff
1382
1382
- import { useGetList, RecordMap } from 'react-admin';
1383
- + import { useGetList, Record } from 'react-admin';
1383
+ + import { useGetList, RaRecord } from 'react-admin';
1384
1384
1385
1385
const PostListContainer = () => {
1386
1386
- const { data, ids, loading } = useGetList(
@@ -1400,7 +1400,7 @@ const PostListContainer = () => {
1400
1400
};
1401
1401
1402
1402
- const PostListDetail = ({ ids, data }: { ids: string[], data: RecordMap }) => {
1403
- + const PostListDetail = ({ data }: { data: Record [] }) => {
1403
+ + const PostListDetail = ({ data }: { data: RaRecord [] }) => {
1404
1404
- return <>{ids.map(id => <span key={id}>{data[id].title}</span>)}</>;
1405
1405
+ return <>{data.map(record => <span key={record.id}>{record.title}</span>)}</>;
1406
1406
};
You can’t perform that action at this time.
0 commit comments