github refinedev/refine @refinedev/antd@5.36.18

Patch Changes

  • #5199 2b8d658a17a Thanks @aliemir! - Now useSelect, useRadioGroup and useCheckboxGroup hooks accept 4th generic type TOption which allows you to change the type of options. By default TOption will be equal to BaseOption type which is { label: any; value: any; }. If you want to change the type of options, you can do it like this:

    import { useSelect } from "@refinedev/antd";
    import { HttpError } from "@refinedev/core";
    
    type MyData = {
        id: number;
        title: string;
        description: string;
        category: { id: string };
    };
    
    type Option = { label: MyData["title"]; value: MyData["id"] }; // equals to { label: string; value: number; }
    
    useSelect<MyData, HttpError, MyData, Option>({
        resource: "posts",
    });
  • #5199 2b8d658a17a Thanks @aliemir! - Updated return types of useSelect, useRadioGroup and useCheckboxGroup hooks to only include properties that actually being returned from the hook. Previously, the return types included all properties of the respective components, which was not correct.

  • #5201 760cfbaaa2a Thanks @aliemir! - Handle nested server side validation errors properly in useForm

Don't miss a new refine release

NewReleases is sending notifications on new releases.