refine

A React Framework for building internal tools, admin panels, dashboards & B2B apps with unmatched flexibility.

MIT License

Downloads
1.1M
Stars
25.3K
Committers
269

Bot releases are visible (Hide)

refine - @refinedev/[email protected]

Published by refine-bot about 1 year ago

Patch Changes

refine - @refinedev/[email protected]

Published by refine-bot about 1 year ago

Patch Changes

  • #4903 e327cadc011 Thanks @yildirayunlu! - feat: add invalidateOnUnmount prop to useForm hook.
    feat: add invalidateOnUnmount and invalidateOnClose prop to useModalForm hook.
    From now on, you can use these props to invalidate queries upon unmount and/or close
refine - @refinedev/[email protected]

Published by refine-bot about 1 year ago

Patch Changes

refine - [email protected]

Published by refine-bot about 1 year ago

Patch Changes

refine - @refinedev/[email protected]

Published by refine-bot about 1 year ago

Minor Changes

  • #4914 91a4d0da9f1 Thanks @yildirayunlu! - feat: add optimisticUpdateMap prop to the useUpdate and useUpdateMany hooks

    list, many and detail are the keys of the optimisticUpdateMap object. To automatically update the cache, you should pass true. If you don't want to update the cache, you should pass false.

    If you wish to customize the cache update, you have the option to provide functions for the list, many, and detail keys. These functions will be invoked with the previous data, values, and id parameters. Your responsibility is to return the updated data within these functions.

    const { mutate } = useUpdateMany();
    
    mutate({
        //...
        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,
                };
            },
        },
    });
    

    feat: add optimisticUpdateMap prop to the useForm hook

    const { formProps, saveButtonProps } = 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

refine - @refinedev/[email protected]

Published by refine-bot about 1 year ago

Minor Changes

  • #4904 b1ab9a23520 Thanks @alicanerdurmaz! - feat: added add command to add new features to the project
    Now you can add a new provider or resource to the project using the command npm run refine add <arg>.

    • npm run refine add resource posts: will add a new resource to the project with the name posts.
    • npm run refine add auth: will add a new auth provider to the project.
    • npm run refine add data: will add a new data provider to the project.
    • npm run refine add live: will add a new live provider to the project.
    • npm run refine add access-control: will add a new access control provider to the project.
    • npm run refine add audit-log: will add a new audit log provider to the project.
    • npm run refine add i18n: will add a new i18n provider to the project.
    • npm run refine add notification: will add a new notification provider to the project.
refine - @refinedev/[email protected]

Published by refine-bot about 1 year ago

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.

refine - @refinedev/[email protected]

Published by refine-bot about 1 year ago

Patch Changes

refine - @refinedev/[email protected]

Published by refine-bot about 1 year ago

Patch Changes

refine - @refinedev/[email protected]

Published by refine-bot about 1 year ago

Patch Changes

refine - @refinedev/[email protected]

Published by refine-bot about 1 year ago

Patch Changes

  • #4951 04837c62077 Thanks @aliemir! - - Update build configuration for esbuild to use the shared plugins.
    • Fix the lodash replacement plugin to skip redundant files.
refine - @refinedev/[email protected]

Published by refine-bot about 1 year ago

Patch Changes

refine - @refinedev/[email protected]

Published by refine-bot about 1 year ago

Patch Changes

refine - @refinedev/[email protected]

Published by refine-bot about 1 year ago

Patch Changes

refine - @refinedev/[email protected]

Published by refine-bot about 1 year ago

Patch Changes

  • #4951 04837c62077 Thanks @aliemir! - - Update build configuration for esbuild to use the shared plugins.
    • Fix the lodash replacement plugin to skip redundant files.
refine - @refinedev/[email protected]

Published by refine-bot about 1 year ago

Patch Changes

  • #4951 04837c62077 Thanks @aliemir! - - Update build configuration for esbuild to use the shared plugins.
    • Fix the lodash replacement plugin to skip redundant files.
refine - @refinedev/[email protected]

Published by refine-bot about 1 year ago

Patch Changes

  • #4951 04837c62077 Thanks @aliemir! - - Update build configuration for esbuild to use the shared plugins.
    • Fix the lodash replacement plugin to skip redundant files.
refine - @refinedev/[email protected]

Published by refine-bot about 1 year ago

Patch Changes

refine - @refinedev/[email protected]

Published by refine-bot about 1 year ago

Patch Changes

refine - @refinedev/[email protected]

Published by refine-bot about 1 year ago

Patch Changes