Patch Changes
-
#5423
75bb61dd3b
Thanks @aliemir! - UpdatedflattenObjectKeys
method to support both nested and non-nested variables when propagating server side errors to form fields. Resolves #5461 -
#5401
93e00fd770
Thanks @alicanerdurmaz! - fix:queryKey
is not overrideable. To fix this,useQuery
overloads refactored with single argument objects.- useQuery(queryKey, queryFn, options); + useQuery({ queryKey, queryFn, ...options });
From now on, you can pass
queryKey
as an object property.// all data hooks can be used with this syntax. useList({ queryOptions: { queryKey: ["my-query-key"], }, });
-
#5406
e5888b6b9c
Thanks @aliemir! -useMenu
hook was using outdatedmeta
and routerparams
due to missing dependency of the callback function. This was causing dynamic menu items to use wrong paths as links. (Resolves #5432) -
#5452
b621223bfb
Thanks @aliemir! - Added the ability to passmeta
properties when usinguseGo
'sgo
function withto
as a resource object. This allows you to pass additional path parameters to the path defined in the resources array within the<Refine />
component. Resolves #5451Assume we have the following resource defined in the
<Refine />
component:{ name: "posts", list: "/posts", edit: "/:foo/posts/:id/edit", }
import { useGo } from "@refinedev/core"; const MyButton = () => { const go = useGo(); return ( <Button onClick={() => { go({ to: { resource: "posts", action: "edit", id: "1", meta: { foo: "bar", }, }, type: "push", }); // generated path will be "/bar/posts/1/edit" }} > Go Posts </Button> ); };
-
#5381
19ceffbe9f
Thanks @aberhamm! - fix: MissingloginLink
attribute inAuthPageProps
for<AuthPage type="register" />
. #5381