Open joyzhong opened 4 years ago
I have experienced this also and I have found out where my mistake was.
To initialize tag (e.g. int tag = 0;) for the selected choice, you need to initialize it outside the ChipsChoice widget and somewhere inside the class. My mistake was that I initialized it inside ChipsChoice widget and variable tag will always stay on the same Chip cuz unchanged, leading to the buttons not working.
Maybe you can check if you share the same problem as well. It's working fine now for me.
(Copying over from issue that was originally filed as https://github.com/material-components/material-components-web/issues/5715)
Bug report
Choice chips simply don't work. If you set a chip to be selected at first, you see it, but as soon as you interact with it or others, nothing works anymore.
Steps to reproduce
Actual behavior
You can't select any chip
Expected behavior
You should be able to change the selected chip by clicking another one.
Screenshots
See this gifv
Your Environment: