Hi,
Current Behavior 😯
I am trying to conditionally render my Chip component to be clickable or read-only. When I set clickable={false}, it still executes onClick when pressed.
Expected Behavior 🤔
I would naturally expect that both UI and the method execution would be disabled by the clickable={false} option.
Steps to Reproduce 🕹
I added a quick sandbox example here to reproduce: https://codesandbox.io/s/vigilant-water-2yygy?file=/src/App.js
Steps:
- add
onClick method
- add
clickable={false} line
- click on the tag in the UI
- it still executes the
onClick() method
Your Environment 🌎
Using latest 4.11.3 core version:
OS: macOS Mojave 10.14.5
Binaries:
Node: 10.21.0 - /usr/local/bin/node
Yarn: Not Found
npm: 6.14.4 - /usr/local/bin/npm
Browsers:
Chrome: 88.0.4324.96
Edge: Not Found
Firefox: 83.0
Safari: 12.1.1
npmPackages:
@material-ui/core: ^4.11.3 => 4.11.3
@material-ui/icons: ^4.5.1 => 4.5.1
@material-ui/lab: ^4.0.0-alpha.38 => 4.0.0-alpha.38
@material-ui/styles: 4.11.3
@material-ui/system: 4.11.3
@material-ui/types: 5.1.0
@material-ui/utils: 4.7.1
@types/react: 16.9.11
react: ^16.9.0 => 16.9.0
react-dom: ^16.9.0 => 16.9.0
Hi,
Current Behavior 😯
I am trying to conditionally render my Chip component to be clickable or read-only. When I set
clickable={false}, it still executesonClickwhen pressed.Expected Behavior 🤔
I would naturally expect that both UI and the method execution would be disabled by the
clickable={false}option.Steps to Reproduce 🕹
I added a quick sandbox example here to reproduce: https://codesandbox.io/s/vigilant-water-2yygy?file=/src/App.js
Steps:
onClickmethodclickable={false}lineonClick()methodYour Environment 🌎
Using latest 4.11.3 core version: