Skip to content

Commit

Permalink
Merge pull request #7633 from waltheri/patch-1
Browse files Browse the repository at this point in the history
Add possibility to disable redirect in useCreateController
  • Loading branch information
djhi committed May 5, 2022
2 parents 1461ad3 + 1ce3769 commit c769bed
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const useCreateController = <RecordType extends RaRecord = RaRecord>(
const resource = useResourceContext(props);
const { hasEdit, hasShow } = useResourceDefinition(props);
const finalRedirectTo =
redirectTo || getDefaultRedirectRoute(hasShow, hasEdit);
redirectTo ?? getDefaultRedirectRoute(hasShow, hasEdit);
const location = useLocation();
const translate = useTranslate();
const notify = useNotify();
Expand Down

0 comments on commit c769bed

Please sign in to comment.