github refinedev/refine @refinedev/mantine@2.24.0

Minor Changes

  • #4652 96af6d25b7a Thanks @alicanerdurmaz! - feat: when the dataProvider returns rejected promise with errors field, useForm will automatically update the error state with the rejected errors field.

    Refer to the server-side form validation documentation for more information. →

  • #4591 f8891ead2bd Thanks @yildirayunlu! - feat: autoSave feature for Edit.
    useForm, useDrawerForm, useModalForm, useStepsForm hooks now accept autoSave object. enabled is a boolean value and debounce is a number value in milliseconds. debounce is optional and default value is 1000.

    const { autoSaveProps } = useForm({
        refineCoreProps: {
            autoSave: {
                enabled: true,
                debounce: 2000, // not required, default is 1000
            },
        }
    });
    
    return (
        <Edit
            saveButtonProps={saveButtonProps}
            // pass autoSaveProps to Edit component
            autoSaveProps={autoSaveProps}
        >
            // form fields
        </Edit>
    );
    

    feat: Add <AutoSaveIndicator> component. It comes automatically when autoSaveProps is given to the Edit page. However, this component can be used to position it in a different place.

    import { AutoSaveIndicator } from "@refinedev/mantine";
    const { autoSaveProps } = useForm({
        refineCoreProps: {
            autoSave: {
                enabled: true,
                debounce: 2000, // not required, default is 1000
            },
        }
    });
    
    return (
        <div>
            <AutoSaveIndicator {...autoSaveProps}>
        </div>
    );
    

Patch Changes

  • Updated dependencies [f8891ead2bd]:
    • @refinedev/ui-types@1.20.0

Don't miss a new refine release

NewReleases is sending notifications on new releases.