R
Refine

ask-any-question

How to navigate to a list page with filter parameters?

Vvicious-gold2/27/2023
I want to navigate to a list page using a filter parameters from where I came on the edit page. After I edit a data I will be redirected to a list page with the default filters, but if there is a way to navigate back with the same filters settings it would be nice. For example I go to edit page from the list page as
http://localhost:3000/schedules/lists?pageSize=10&current=1&sorter[0][field]=id&sorter[0][order]=desc&filters[0][field]=date&filters[0][operator]=eq&filters[0][value]=2023-02-26
http://localhost:3000/schedules/lists?pageSize=10&current=1&sorter[0][field]=id&sorter[0][order]=desc&filters[0][field]=date&filters[0][operator]=eq&filters[0][value]=2023-02-26
And once I complete the edit and save the form I will be redirected to
http://localhost:3000/schedules/lists?pageSize=10&current=1&sorter[0][field]=id&sorter[0][order]=desc&filters[0][field]=date&filters[0][operator]=eq&filters[0][value]=2023-02-27
http://localhost:3000/schedules/lists?pageSize=10&current=1&sorter[0][field]=id&sorter[0][order]=desc&filters[0][field]=date&filters[0][operator]=eq&filters[0][value]=2023-02-27
Ggraceful-beige2/27/2023
Hi, I am refine support bot :wave:. I am here to help you with your question. I searched for the answer to your question in the refine documentation and found an answer! 🏆
Answer: You can navigate to the list page with the same filter parameters by using the URL from where you came on the edit page. SOURCES: ./docs/tutorial/4-adding-crud-pages/mantine/add-edit-page.md, ./docs/tutorial/4-adding-crud-pages/mui/add-edit-page.md, ./docs/tutorial/4-adding-crud-pages/headless/add-list-page.md, ./docs/getting-started/quickstart.md

Note: If this is the answer you need, then we are very lucky. If not, please wait for someone from the refine core team or the community to try to help you.
Qquickest-silver2/27/2023
Hey @dipbazz, unfortunately, it's not possible atm. However, you can set redirect: false and handle redirection manually.
Qquickest-silver2/27/2023
useForm | refine
useForm is a hook that allows to manage forms. It has some action methods that create, edit and clone the form. The hook return value comes to according to the called action and it can run different logic depending on the action.
Vvicious-gold2/28/2023
Hey @batuhanw, are you guys planning anything about this feature? I think that would be a nice to have feature.
Qquickest-silver2/28/2023
Hello @dipbazz, thank you for thoughtful suggestions, we are about to release refine v4, it will be easier to manage this kind of cases. Let's stay in touch 🎉
Vvicious-gold2/28/2023
Waiting for the v4 release to check the new features @batuhanw .

Looking for more? Join the community!

R
Refine

ask-any-question

Join Server
Recommended Posts
Edit page doesn't fetch and populate the form fields.I have multi-level menu and from that menu I have and list page and edit action on list of item. ButMUIInferencer Errorsi am using ```<MuiInferencer resource="metrics" action="list" />``` and am getting the following er[Nextjs | MUI | Supabase] Slow initial load on VercelI'm using Nextjs, MaterialUI, and Supabase. I deployed the app to Vercel under the hobby plan and kTable.Column not render my relation StrapiV4hello guys, good night I trying display a relation in <Table.Column> but im not getting the dataSouDirectus data provider tokenHi guys <:icon:1035476532430381066> I'm using refine CRA but I'm not able to access data from direRun create refine-app in existing directoryHi guys 👋 Wanted to ask, I tried to create a new refine-app project using the command `npm create rDark modeInputs disappear when app switches to dark modeHow to invalidate a custom query of `useCustom`?I want to invalidate a custom query that I have fetched using a `useCustom` hook based on a `useDrawCan I provide filters to resource data being passed to the inferencer in a component?I found the page on using the inferencer as part of a component (https://refine.dev/docs/api-referenmanually modifying inferencer fieldsreference: https://refine.dev/docs/packages/documentation/inferencer/#modifying-the-inferred-fields Add custom query parameter with useListHi, is it possible to add a custom query parameter with `useList` (like `?custom-query=1`) or it shError node-modules @pankod refine-coreI dnt know wha is the error or what it means or what to do to fix it.. the code still works normal ahow do I create a link that will not be on the sidebar?How do I create new routes snd links ghat will not show on the sider , but ll be distributed across how do I switch from google authentication to create a username and password?How can i create a login page where uder can create their username and password or login with as use