github refinedev/refine @refinedev/core@4.46.2

Patch Changes

  • #5423 75bb61dd3b Thanks @aliemir! - Updated flattenObjectKeys 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 outdated meta and router params 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 pass meta properties when using useGo's go function with to 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 #5451

    Assume 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: Missing loginLink attribute in AuthPageProps for <AuthPage type="register" />. #5381

Don't miss a new refine release

NewReleases is sending notifications on new releases.