user2284976
user2284976

Reputation: 1

How to support view other resources data on a resource Show layout

For examples, I have 3 resources that lies on 3 different API endpoints.

<FooResource /> -> my.api/foo

<BarResource /> -> my.api/bar

<BuzResource /> -> my.api/buz

The <FooResource /> has the correspond Show layout called <FooResourceShow />

The <BarResource /> has the correspond List layout called <BarResourceList />

The <BuzResource /> has the correspond List layout called <BuzResourceList />

How can I display <BarResourceList /> and <BuzResourceList /> in <FooResourceShow />, or in other words, display others resources data in a resource view ?

I tried to import the BarResourceList and BuzResourceList components into the FooResourceShow component, but it doesn't work, because it doesn't know the data to be displayed from BarResourceList and BuzResourceList

I'm using react-admin 2.2.0

Any solutions on this case ?

Thanks

Upvotes: 0

Views: 268

Answers (1)

BaliJack
BaliJack

Reputation: 117

If you only want to show content from various resources on one page, have a look at the demo Dashboard.

Multiple dataProvider(GET_LIST,... that you pass on to a component.

Upvotes: 1

Related Questions