kenshoo / react-multi-select

A Multi Select component built with and for React
https://kenshoo.github.io/react-multi-select
MIT License
120 stars 53 forks source link

Clicking a switch button in a selected item removes it #202

Open bigBxr opened 2 years ago

bigBxr commented 2 years ago

Expected Behavior

I added a Switch button to each selected item so I can flag certain selected items. Clicking the switch onChange() should simply flip the switch and run my JS code.

Actual Behavior

Clicking the switch immediately removes the item from the selected items list.

Steps to Reproduce the Problem

  1. Add a switch in the selectedItemRenderer={(props)=>{ return(
    ...
    )}}
  2. Click on LHS column items to add them to RHS column.
  3. Click on a Switch in the RHS column. The item gets removed

Specifications