File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ function App() {
1212 dataProvider = { lb4Provider ( process . env . REACT_APP_API_URL , httpClient ) }
1313 authProvider = { authProvider }
1414 >
15+ < Resource name = 'films' />
16+
1517 < Resource name = 'customers' list = { CustomerList } />
1618 < Resource name = 'rentals' list = { RentalList } edit = { RentalEdit } />
1719
Original file line number Diff line number Diff line change @@ -4,14 +4,17 @@ import {
44 Datagrid ,
55 TextField ,
66 DateField ,
7+ ReferenceField ,
78} from 'react-admin' ;
89
9-
1010const RentalList = ( props ) => (
11- < List { ...props } title = 'List of Rentals' >
11+ < List { ...props } title = 'List of Rentals' >
1212 < Datagrid rowClick = 'edit' >
1313 < TextField source = 'id' />
1414 < TextField source = 'status' />
15+ < ReferenceField label = 'Movie Name' source = 'film_id' reference = 'films' link = { false } >
16+ < TextField source = 'title' />
17+ </ ReferenceField >
1518 < TextField source = 'inventory_id' />
1619 < TextField source = 'customer_id' />
1720 < TextField source = 'staff_id' />
You can’t perform that action at this time.
0 commit comments