github refinedev/refine @refinedev/chakra-ui@2.14.0

Minor Changes

  • #4303 0c569f42b4e Thanks @alicanerdurmaz! - feat: added default button props into the renderer functions headerButtons and footerButtons in CRUD components.
    Now, customization of the header and footer buttons can be achieved without losing the default functionality.

    import {
        DeleteButton,
        EditButton,
        ListButton,
        RefreshButton,
        Show,
    } from "@refinedev/chakra-ui";
    
    const PostShow = () => {
        return (
            <Show
                headerButtons={({
                    deleteButtonProps,
                    editButtonProps,
                    listButtonProps,
                    refreshButtonProps,
                }) => {
                    return (
                        <>
                            {/* custom components */}
                            {listButtonProps && (
                                <ListButton
                                    {...listButtonProps}
                                    meta={{ foo: "bar" }}
                                />
                            )}
                            {editButtonProps && (
                                <EditButton
                                    {...editButtonProps}
                                    meta={{ foo: "bar" }}
                                />
                            )}
                            {deleteButtonProps && (
                                <DeleteButton
                                    {...deleteButtonProps}
                                    meta={{ foo: "bar" }}
                                />
                            )}
                            <RefreshButton
                                {...refreshButtonProps}
                                meta={{ foo: "bar" }}
                            />
                        </>
                    );
                }}
            >
                {/* ... */}
            </Show>
        );
    };

Patch Changes

Don't miss a new refine release

NewReleases is sending notifications on new releases.