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
What you were expecting:
I needed to pass some custom query parameter to the create page.
For that I used useRedirect with a simple Button, and so added the needed params.
It worked until I changed version from 3.12.0 to 3.14.2.
What happened instead:
With the new version clicking on the button the page attempt to load and it display a Element does not exists notification and return on the list page.
In the network tab, I see that react-admin attempt to fetch a resource with the id create.
Seems like react-admin believe I want to edit.
Steps to reproduce:
Simply create a button to redirect to a creation page using useRedirect.
constCustomCreateButton=()=>{constredirect=useRedirect();constonClick=()=>redirect("posts/create?foo=bar");return(<Buttoncolor="primary"variant="outlined"onClick={onClick}>
redirect to create
</Button>);};
What you were expecting:
I needed to pass some custom query parameter to the create page.
For that I used useRedirect with a simple Button, and so added the needed params.
It worked until I changed version from 3.12.0 to 3.14.2.
What happened instead:
With the new version clicking on the button the page attempt to load and it display a
Element does not exists
notification and return on the list page.In the network tab, I see that react-admin attempt to fetch a resource with the id create.
Seems like react-admin believe I want to edit.
Steps to reproduce:
Simply create a button to redirect to a creation page using useRedirect.
Related code:
Here is a code sand box
https://codesandbox.io/s/jovial-glitter-of0yi?file=/src/posts/PostList.tsx
Simply go to the list of post and click on the
redirect to create
at the top.Other information:
It is possible to avoid the issue by using a Link instead of useRedirect.
Environment
The text was updated successfully, but these errors were encountered: