marmelab / marmelab/react-admin
The `component` property is not definable in `<DeleteWithConfirmButton>`
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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