material-components / material-components-web

Modular and customizable Material Design UI components for the web
https://material.io/develop/web
MIT License
17.14k stars 2.15k forks source link

[MDCChipSet] Update docs to use trailing action component #6136

Open alcarazzam opened 4 years ago

alcarazzam commented 4 years ago

Bug report

Can't remove chips clicking in the trailing remove icon since version 7.0.0

Steps to reproduce

  1. Go to https://codepen.io/alcarazzam/pen/RwWeOQK. The demo actually works, but hard to find.
  2. Try to remove a chip.

Actual behavior

Can't remove the chip

Expected behavior

Chip is removed

Your Environment:

Software Version(s)
MDC Web 7.0.0
Browser 83.0.4103.116
Operating System Arch Linux
ota-meshi commented 4 years ago

Hi @m-alzam. I happened to find this issue and the following component, so I will share them with you.

Perhaps you should use the trailingaction component.

https://github.com/material-components/material-components-web/tree/master/packages/mdc-chips/trailingaction

The problem may be that the documentation is hard to find.

alcarazzam commented 4 years ago

Thanks @ota-meshi! I only had to add the mdc-chip-trailing-action class to the remove button in order to make it work. The documentation should include these information.

joyzhong commented 4 years ago

@patrickrodee Do we need to update the docs section of https://github.com/material-components/material-components-web/tree/master/packages/mdc-chips#trailing-icon to reflect that users should use the trailing action component instead?