react-admin icon indicating copy to clipboard operation
react-admin copied to clipboard

The `component` property is not definable in `<DeleteWithConfirmButton>`

Open antoinefricker opened this issue 8 months ago • 2 comments

What you were expecting:

Be able to specify component property of the <DeleteWithConfirmButton> component.

What happened instead:

Setting <DeleteWithConfirmButton component="a" ... /> (which is acceptable for the React-Admin or MUI <Button> components) will trigger a TS error:

Type '"a"' is not assignable to type '"button"'.

The same behavior is applicable to <CloneButton /> so it might be a more global issue.

Related code:

https://stackblitz.com/edit/github-uvsgue?file=src%2Fusers%2FUserEdit.tsx

antoinefricker avatar Oct 25 '23 12:10 antoinefricker