You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We keep struggling creating customized list views.
Because <List /> is tightly coupled with the URL, it makes it complicated to use it in customRoutes.
What we want is to fetch and display a list of records with the react-admin UI.
We have tried to use <Resource /> to create more than one list view (It seems from marmelab/react-admin#2903 (comment) that people can build most of the UI with the current react-admin without hassle).
I want a way to pass filter to the list within any <Resource />, for instance:
exportdefaultfunctionProjectServiceNewslettersList(props){return(<List{...props}filter={{project_id: match.params.id}}// <~~~ This will come from the URL using withRoutersort={{field: 'id',order: 'DESC'}}filters={<ProjectServiceNewslettersListFilter/>}><Datagridstripedhover><TextFieldsource="name"/><ShowButtonsize="sm"/></Datagrid></List>);}
We expect to query the backend with the replaced params of the url we are on when querying the list.
I assert this is not currently possible because <Resource />.
This would have helped us to set filter on <List /> using params from the URL and create more than one list per entities.
Description
This feature would permit:
<Resource name="users/:userId/choses/:choseId" />
without having REST request using the wrong url.
That can be done using a custom <Resource />:
read match.params and interpolate if this is not already done yet.
during resources registration within redux, we need to see how we could store those resources. => *for examples, in pages, when we have param path, we replace : with $, we could pick the same strategy for redux-store.
Supports of params in
<Resource />
nameWe keep struggling creating customized list views.
Because
<List />
is tightly coupled with the URL, it makes it complicated to use it incustomRoutes
.What we want is to fetch and display a list of records with the react-admin UI.
We have tried to use
<Resource />
to create more than one list view (It seems from marmelab/react-admin#2903 (comment) that people can build most of the UI with the current react-admin without hassle).I want a way to pass
filter
to the list within any<Resource />
, for instance:Issue Type
Reproduction
I have declared the resource as follow:
Result
Params are not replaced in CRUD requests.
Expected
We expect to query the backend with the replaced params of the url we are on when querying the list.
I assert this is not currently possible because
<Resource />
.This would have helped us to set
filter
on<List />
using params from the URL and create more than one list per entities.Description
This feature would permit:
without having REST request using the wrong url.
That can be done using a custom
<Resource />
:match.params
and interpolate if this is not already done yet.pages
, when we have param path, we replace:
with$
, we could pick the same strategy for redux-store.Related issues
The text was updated successfully, but these errors were encountered: