marmelab / marmelab/react-admin

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

Open
#9,389 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

TypeScript
Dominant language
TypeScript
Stars
26.9k
Forks
5.5k
Avg merge
2d 3h
Merged PRs (30d)
19

Description

**What you were expecting:**

Be able to specify component property of the `` component.

**What happened instead:**

Setting `` (which is acceptable for the React-Admin or MUI `` components) will trigger a TS error:
```
Type '"a"' is not assignable to type '"button"'.
```

The same behavior is applicable to `` so it might be a more global issue.

**Related code:**

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the TypeScript error from the linked StackBlitz example with DeleteWithConfirmButton and then inspect the component's type definition. Check the related CloneButton behavior as well; done means component="a" is accepted without the reported type error for both affected components.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.