UNPKG

ra-core

Version:

Core components of react-admin, a frontend Framework for building admin applications on top of REST services, using ES6, React

15 lines 586 B
import { DataProvider, FetchRelatedRecords } from '../types'; /** * Helper function for calling the dataProvider.getMany() method, * and getting a Promise for the records indexed by id in return. * * @example * fetchRelatedRecords(dataProvider)(records, 'post_id', 'posts').then(posts => * posts.map(record => ({ * ...record, * post_title: posts[record.post_id].title, * })) * ); */ export declare const fetchRelatedRecords: (dataProvider: DataProvider) => FetchRelatedRecords; //# sourceMappingURL=fetchRelatedRecords.d.ts.map