github refinedev/refine @refinedev/antd@5.36.8

Patch Changes

  • #4945 b838412f0d0 Thanks @MahirMahdi! - fix: antd notificationProvider issue

    Antd notification component could not access theme context, now it's fixed.

    This release provides an alternative to exported notificationProvider value from type NotificationProvider to () => NotificationProvider. If you previously had customizations applied to the notificationProvider object, you may need to update your code like the following:

    - import { notificationProvider } from "@refinedev/antd";
    + import { useNotificationProvider } from "@refinedev/antd";
    + import { App as AntdApp } from "antd";
    
    - const myNotificationProvider = {
    -    ...notificationProvider,
    -    open: (...args) => {
    -        // do some operation here
    -        notificationProvider.open(...args);
    -    },
    - }
    + const myNotificationProvider = () => {
    +     const notificationProvider = useNotificationProvider();
    +     return {
    +          ...notificationProvider,
    +          open: (...args) => {
    +             // do some operation here
    +             notificationProvider.open(...args);
    +          },
    +     }
    + }
    }
    
    const App = () => {
        return (
    +        <AntdApp>
                <Refine
                    /* ... */
    +                notificationProvider={myNotificationProvider}
                >
                    /* ... */
                </Refine>
    +        </AntdApp>
        );
    }

Don't miss a new refine release

NewReleases is sending notifications on new releases.