import { Datagrid, List, ReferenceManyCount, TextField } from "react-admin" import { useParams } from "react-router-dom"; const MyFirstPage = () => { const {mycode} = useParams(); console.log('code is: ', mycode); return( <List resource="t_prod_category" filter={{code: mycode}}> <Datagrid> <TextField source = 'id' /> <TextField source = 'code' /> <ReferenceManyCount label = "style" reference="t_prod_style" target = 'category_id' link /> </Datagrid> </List> ) } export default MyFirstPage;