Topic: MDBReact Chip onDelete callkback does not run

mac.wierda@dataworld.ai priority asked 1 year ago


Expected behavior When using the onDelete callback with the MDBChip component the function will run.

Actual behavior The chip is deleted correctly, but the onDelete method does not run. onClick does work, but I want a method that runs specifically when the closeIcon is clicked

Resources (screenshots, code snippets etc.)

<>
      <MDBCol>
        <MDBChip
          closeIcon
          color="primary"
          onDelete={() => {
            console.log("asdf");
          }}
        >
          ASDF
        </MDBChip>
      </MDBCol>
    </>


Are you sure that your package version is 4.0.0? Try running npm i mdb-react-ui-kit or yarn add mdb-react-ui-kit and check if the issue still exists.


mac.wierda@dataworld.ai priority commented 1 year ago

Yes thank you, I was on 3.0.0. On 4.0.0 it works.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB React
  • MDB Version: MDB5 3.0.0
  • Device: Laptop
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: No