github refinedev/refine @refinedev/antd@5.36.0

Minor Changes

  • #4914 91a4d0da9f1 Thanks @yildirayunlu! - feat: optimisticUpdateMap prop added to useForm hook. This prop allows you to update the data in the cache.

    useForm({
        mutationMode: "optimistic",
        optimisticUpdateMap: {
            list: true,
            many: true,
            detail: (previous, values, id) => {
                if (!previous) {
                    return null;
                }
    
                const data = {
                    id,
                    ...previous.data,
                    ...values,
                    foo: "bar",
                };
    
                return {
                    ...previous,
                    data,
                };
            },
        },
    });

Patch Changes

  • #4903 e327cadc011 Thanks @yildirayunlu! - fix: when using useForm, autoSave parameters not passed to @refinedev/core/useForm hook.
    From now on, you can use autoSave parameters in useForm hook.

    feat: add invalidateOnUnmount prop to useForm hook.
    feat: add invalidateOnUnmount and invalidateOnClose prop to useModalForm and useDrawerForm hooks.
    From now on, you can use the use this props to invalidate queries upon unmount or close.

Don't miss a new refine release

NewReleases is sending notifications on new releases.