{"action":"created","issue":{"url":"https://api.github.com/repos/marmelab/admin-on-rest/issues/22","repository_url":"https://api.github.com/repos/marmelab/admin-on-rest","labels_url":"https://api.github.com/repos/marmelab/admin-on-rest/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/marmelab/admin-on-rest/issues/22/comments","events_url":"https://api.github.com/repos/marmelab/admin-on-rest/issues/22/events","html_url":"https://github.com/marmelab/admin-on-rest/issues/22","id":330535205,"node_id":"MDU6SXNzdWUzMzA1MzUyMDU=","number":22,"title":"How to provide a custom redirect to a SimpleForm inside Edit ?","user":{"login":"christopheblin","id":11044877,"node_id":"MDQ6VXNlcjExMDQ0ODc3","avatar_url":"https://avatars2.githubusercontent.com/u/11044877?v=4","gravatar_id":"","url":"https://api.github.com/users/christopheblin","html_url":"https://github.com/christopheblin","followers_url":"https://api.github.com/users/christopheblin/followers","following_url":"https://api.github.com/users/christopheblin/following{/other_user}","gists_url":"https://api.github.com/users/christopheblin/gists{/gist_id}","starred_url":"https://api.github.com/users/christopheblin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christopheblin/subscriptions","organizations_url":"https://api.github.com/users/christopheblin/orgs","repos_url":"https://api.github.com/users/christopheblin/repos","events_url":"https://api.github.com/users/christopheblin/events{/privacy}","received_events_url":"https://api.github.com/users/christopheblin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-08T06:30:22Z","updated_at":"2018-06-08T06:50:43Z","closed_at":"2018-06-08T06:50:43Z","author_association":"NONE","body":"After an edit, I follow the convention to redirect on the list.\r\n\r\nHowever, I am in a case where I need to provide additional parameters in the list URL.\r\n\r\nIs there a way to \"cheat\"  on SimpleForm/Edit to customize the redirect ?\r\n\r\nHere is the relevant part of my code :\r\n\r\n```\r\nconst ProviderUserEditActions = ({ basePath, data }) => {\r\n  if (! data) return null\r\n  return (\r\n    <CardActions style={cardActionStyle}>\r\n        <ListButton basePath={basePath+'?'+queryString.stringify({providerId:data.providerId, providerName:data.providerName})} />\r\n        <RefreshButton />\r\n    </CardActions>\r\n  );\r\n}\r\n\r\nexport const ProviderUserEdit = (props) => (\r\n    <Edit actions={<ProviderUserEditActions/>} title={<ProviderUserEditTitle />} {...props}>\r\n        {/*redirect=false will cause the loosing of the URL parameters :(\r\n          but this is the \"least worst\", because otherwise it would redirect to\r\n          'list' but without URL parameters it will completely crash...\r\n          we hope that someday we will be able to provide our own redirect\r\n          function\r\n          */}\r\n        <SimpleForm redirect={false}>\r\n            <TextInput source=\"name\" />\r\n            <TextInput source=\"email\" />\r\n            <TextInput source=\"phone\" />\r\n            <BooleanInput source=\"activated\" />\r\n        </SimpleForm>\r\n    </Edit>\r\n);\r\n```"},"comment":{"url":"https://api.github.com/repos/marmelab/admin-on-rest/issues/comments/395666024","html_url":"https://github.com/marmelab/admin-on-rest/issues/22#issuecomment-395666024","issue_url":"https://api.github.com/repos/marmelab/admin-on-rest/issues/22","id":395666024,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NTY2NjAyNA==","user":{"login":"djhi","id":1122076,"node_id":"MDQ6VXNlcjExMjIwNzY=","avatar_url":"https://avatars2.githubusercontent.com/u/1122076?v=4","gravatar_id":"","url":"https://api.github.com/users/djhi","html_url":"https://github.com/djhi","followers_url":"https://api.github.com/users/djhi/followers","following_url":"https://api.github.com/users/djhi/following{/other_user}","gists_url":"https://api.github.com/users/djhi/gists{/gist_id}","starred_url":"https://api.github.com/users/djhi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djhi/subscriptions","organizations_url":"https://api.github.com/users/djhi/orgs","repos_url":"https://api.github.com/users/djhi/repos","events_url":"https://api.github.com/users/djhi/events{/privacy}","received_events_url":"https://api.github.com/users/djhi/received_events","type":"User","site_admin":false},"created_at":"2018-06-08T06:50:43Z","updated_at":"2018-06-08T06:50:43Z","author_association":"CONTRIBUTOR","body":"Hi, and thanks for your question. As explained in the [react-admin contributing guide](https://github.com/marmelab/react-admin/blob/master/README.md#contributing), the right place to ask a \"How To\" question, get usage advice, or troubleshoot your own code, is [StackOverFlow](http://stackoverflow.com/questions/tagged/react-admin).\r\n\r\nThis makes your question easy to find by the core team, and the developer community. Unlike Github, StackOverFlow has great SEO, gamification, voting, and reputation. That's why we chose it, and decided to keep GitHub issues only for bugs and feature requests.\r\n\r\nSo I'm closing this issue, and inviting you to ask your question at:\r\n\r\nhttp://stackoverflow.com/questions/tagged/react-admin\r\n\r\nAnd once you get a response, please continue to hang out on the react-admin channel in StackOverflow. That way, you can help newcomers and share your expertise!"}}
{"actor":{"display_login":"djhi"}}