Skip to content

[Chip] TypeError: onClick is not a function #46360

@rostyk110

Description

@rostyk110

Steps to reproduce

Steps:

  1. Open this link to live example: https://mui.com/material-ui/react-chip/#basic-chip
  2. Open Console
  3. Click on any Chip that doesn't has onClick property (for example Basic Chip)

Image

Current behavior

component throws an error because of missing onClick in properties

Expected behavior

error shouldn't appear as onClick is optional

Context

No response

Your environment

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Search keywords: chip

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Something doesn't workcomponent: chipThis is the name of the generic UI component, not the React module!

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions