Skip to content

Conversation

@WiXSL
Copy link
Collaborator

@WiXSL WiXSL commented Jan 23, 2026

Fixes #11134

How to Test

Create a small wrapper around EditButtonProps (like the one from issue #11134):

import { EditButton, EditButtonProps } from 'react-admin';

type Props = Omit<EditButtonProps, 'label'> & {
  source: string;
  text?: string;
  label?: string;
};

export const EditButtonEx = ({ source, text, ...rest }: Props) => (
  <EditButton {...rest} label={text} />
);

EditButton renders a MUI Button with component={LinkBase} + forwardRef, so its props should be typed as ButtonProps<typeof LinkBase> (not the default button props). This aligns EditButton, CloneButton, and ListButton with the existing pattern used by ShowButton.

Additional Checks

  • The PR targets master for a bugfix or a documentation fix, or next for a feature
  • The PR includes unit tests (if not possible, describe why)
  • The PR includes one or several stories (if not possible, describe why)
  • The documentation is up to date

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

RFR Ready For Review

Development

Successfully merging this pull request may close these issues.

Type mismatch in ref attribute in EditButton and EditButtonProps

2 participants