No possibility to define chip in onDelete handler
Open
@siriwatknp is already working on this.
Since Apr 10, 2023.
has workaround
scope: chip
type: enhancement
- Dominant language
- JavaScript
- Stars
- 99.1k
- Forks
- 32.5k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 106
Description
Duplicates
- I have searched the existing issues
Latest version
- I have tested the latest version
Steps to reproduce 🕹
Steps:
- Add onDelete handler to the Chip component.
- Add
data-indexoridproperty to the component - Click delete button to raise an event
Current behavior 😯
- Setting
data-indexoriddoesn't affect any changes, they cannot be read from event.target or event.currentTarget
Expected behavior 🤔
I can get an id or dataset property passed to the component from event
Context 🔦
No response
Your environment 🌎
npx @mui/envinfo
System:
OS: macOS 13.2.1
Binaries:
Node: 18.15.0 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 9.5.0 - /usr/local/bin/npm
Browsers:
Chrome: 112.0.5615.49
Edge: Not Found
Firefox: 111.0.1
Safari: 16.3
npmPackages:
@emotion/react: ^11.10.4 => 11.10.4
@emotion/styled: ^11.10.4 => 11.10.4
@mui/base: 5.0.0-alpha.102
@mui/core-downloads-tracker: 5.10.10
@mui/icons-material: ^5.10.9 => 5.11.0
@mui/material: ^5.10.10 => 5.10.10
@mui/private-theming: 5.11.13
@mui/styled-engine: 5.11.11
@mui/system: ^5.11.14 => 5.11.14
@mui/types: 7.2.3
@mui/utils: 5.11.13
@types/react: ^18.0.25 => 18.0.26
react: ^18.2.0 => 18.2.0
react-dom: ^18.2.0 => 18.2.0
typescript: ^4.8.4 => 4.8.4
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.
Assessment
This issue has not been assessed yet.